width = $width;
$this->height = $height;
$this->listOfRectangles = array();
$this->name = "wikimap"; /* default name. We should be able to change it in order to have more than one WikiImage in one page */
}
function addRectangle(&$rect) {
$this->listOfRectangles[] =& $rect;
}
function getRectangles() { return $this->listOfRectangles; }
function serialize() { return serialize($this); }
function unserialize($str) { return unserialize($str); }
/* rect: left-x, top-y, right-x, bottom-y. */
function getHTML() {
/* using PHP output buffering... */
ob_start();
echo '';
return ob_get_clean();
}
/* usage : name;
}
}
?>