ILIAS
eassessment Revision 61809
|
Public Member Functions | |
ilMapArea ($a_item_id=0, $a_nr=0) | |
map area | |
create () | |
create persistent map area object in db | |
_getMaxNr ($a_item_id) | |
get maximum nr of media item (static) | |
read () | |
read map area data into object (item id and nr must be set) | |
update () | |
update map area | |
_resolveIntLinks ($a_item_id) | |
resolve internal links of an item id | |
_getIntLinks ($a_item_id) | |
get all internal links of a media items map areas | |
setItemId ($a_item_id) | |
set media item id | |
getItemId () | |
get item id | |
setNr ($a_nr) | |
set area number | |
getNr () | |
get area number | |
setShape ($a_shape) | |
set shape (IL_AREA_RECT, IL_AREA_CIRCLE, IL_AREA_POLY, IL_AREA_WHOLE_PICTURE) | |
getShape () | |
get shape | |
setCoords ($a_coords) | |
set coords of area | |
getCoords () | |
get coords | |
setTitle ($a_title) | |
set (tooltip)title of area | |
appendTitle ($a_title_str) | |
append string to (tooltip) title of area | |
getTitle () | |
get (tooltip) title | |
setLinkType ($a_link_type) | |
set link type | |
getLinkType () | |
get link type | |
setHref ($a_href) | |
set hyper reference (external link only) | |
getHref () | |
get hyper reference url (external link only) | |
setExtTitle ($a_title) | |
set link text (external link only) | |
getExtTitle () | |
get link text (external link only) | |
setTarget ($a_target) | |
set link target (internal link only) | |
getTarget ($a_insert_inst=false) | |
get link target (internal link only) | |
setType ($a_type) | |
set link type (internal link only) | |
getType () | |
get link type (internal link only) | |
setTargetFrame ($a_target_frame) | |
set link target frame (internal link only) | |
getTargetFrame () | |
get link target frame (internal link only) | |
draw (&$a_image, $a_col1, $a_col2, $a_close_poly=true, $a_x_ratio=1, $a_y_ratio=1) | |
draw image to | |
drawLine (&$im, $x1, $y1, $x2, $y2, $c1, $c2) | |
draws an outlined two color line in an image | |
drawRect (&$im, $coords, $c1, $c2, $a_x_ratio=1, $a_y_ratio=1) | |
draws an outlined two color rectangle | |
drawPoly (&$im, $coords, $c1, $c2, $closed, $a_x_ratio=1, $a_y_ratio=1) | |
draws an outlined two color polygon | |
drawCircle (&$im, $coords, $c1, $c2, $a_x_ratio=1, $a_y_ratio=1) | |
draws an outlined two colored circle | |
countCoords ($c) | |
count the number of coordinates (x,y) in a coordinate string (format: "x1,y1,x2,y2,x3,y3,...") |
Static Public Member Functions | |
static | _getMobsForTarget ($a_type, $a_target) |
Get areas for a certain target. |
Data Fields | |
$item_id | |
$nr | |
$shape | |
$coords | |
$title | |
$linktype | |
$xl_title | |
$xl_href | |
$il_target | |
$il_type | |
$il_target_frame |
Class ilMapArea.
Map Area of an Image Map, subobject of Media Item
Definition at line 35 of file class.ilMapArea.php.
ilMapArea::_getIntLinks | ( | $a_item_id | ) |
get all internal links of a media items map areas
int | $a_item_id | media item id |
Definition at line 192 of file class.ilMapArea.php.
References $ilDB, $type, and IL_INT_LINK.
Referenced by ilMediaItem\_getMapAreasIntLinks(), and ilObjMediaObject\getLinkedMediaObjects().
ilMapArea::_getMaxNr | ( | $a_item_id | ) |
get maximum nr of media item (static)
int | $a_item_id | item id |
Definition at line 97 of file class.ilMapArea.php.
References $ilDB.
Referenced by ilMediaItem\_getMediaItemsOfMOb(), ilImageMapEditorGUI\deleteAreas(), ilImageMapTableGUI\getItems(), ilMediaItem\read(), ilImageMapEditorGUI\saveArea(), and ilImageMapEditorGUI\updateAreas().
|
static |
Get areas for a certain target.
Definition at line 221 of file class.ilMapArea.php.
References $ilDB, $mobs, and ilMediaItem\_lookupMobId().
Referenced by ilLMObject\updateInternalLinks().
ilMapArea::_resolveIntLinks | ( | $a_item_id | ) |
resolve internal links of an item id
Definition at line 157 of file class.ilMapArea.php.
References $ilDB, $item_id, $nr, $query, $type, ilInternalLink\_getIdForImportId(), and IL_INT_LINK.
Referenced by ilMediaItem\_resolveMapAreaLinks().
ilMapArea::appendTitle | ( | $a_title_str | ) |
append string to (tooltip) title of area
string | $a_title_str | title string |
Definition at line 335 of file class.ilMapArea.php.
ilMapArea::countCoords | ( | $c | ) |
count the number of coordinates (x,y) in a coordinate string (format: "x1,y1,x2,y2,x3,y3,...")
string | $c | coordinate string |
Definition at line 615 of file class.ilMapArea.php.
Referenced by ilImageMapEditorGUI\addArea(), drawPoly(), ilImageMapEditorGUI\editMapArea(), and ilImageMapEditorGUI\setShape().
ilMapArea::create | ( | ) |
create persistent map area object in db
Definition at line 70 of file class.ilMapArea.php.
References $ilDB, getCoords(), getHref(), getItemId(), getLinkType(), getNr(), getShape(), getTarget(), getTargetFrame(), getTitle(), and getType().
ilMapArea::draw | ( | & | $a_image, |
$a_col1, | |||
$a_col2, | |||
$a_close_poly = true , |
|||
$a_x_ratio = 1 , |
|||
$a_y_ratio = 1 |
|||
) |
draw image to
boolean | $a_close_poly | close polygon |
Definition at line 485 of file class.ilMapArea.php.
References drawCircle(), drawPoly(), drawRect(), getCoords(), and getShape().
ilMapArea::drawCircle | ( | & | $im, |
$coords, | |||
$c1, | |||
$c2, | |||
$a_x_ratio = 1 , |
|||
$a_y_ratio = 1 |
|||
) |
draws an outlined two colored circle
int | $im | image identifier as returned by ImageCreateFromGIF() |
string | $coords | coordinate string, format : "x,y,r" with (x,y) as center point and r as radius |
int | $c1 | color identifier 1 |
int | $c3 | color identifier 2 |
Definition at line 599 of file class.ilMapArea.php.
References $coords.
Referenced by draw().
ilMapArea::drawLine | ( | & | $im, |
$x1, | |||
$y1, | |||
$x2, | |||
$y2, | |||
$c1, | |||
$c2 | |||
) |
draws an outlined two color line in an image
int | $im | image identifier as returned by ImageCreateFromGIF() etc. |
int | $x1 | x-coordinate of starting point |
int | $y1 | y-coordinate of starting point |
int | $x2 | x-coordinate of ending point |
int | $y2 | y-coordinate of ending point |
int | $c1 | color identifier 1 |
int | $c2 | color identifier 2 |
Definition at line 518 of file class.ilMapArea.php.
Referenced by drawPoly(), and drawRect().
ilMapArea::drawPoly | ( | & | $im, |
$coords, | |||
$c1, | |||
$c2, | |||
$closed, | |||
$a_x_ratio = 1 , |
|||
$a_y_ratio = 1 |
|||
) |
draws an outlined two color polygon
int | $im | image identifier as returned by ImageCreateFromGIF() etc. |
string | $coords | coordinate string, format : "x1,y1,x2,y2,..." with every (x,y) pair is an ending point of a line of the polygon |
int | $c1 | color identifier 1 |
int | $c3 | color identifier 2 |
boolean | $closed | true: the first and the last point will be connected with a line |
Definition at line 561 of file class.ilMapArea.php.
References $coords, countCoords(), and drawLine().
Referenced by draw().
ilMapArea::drawRect | ( | & | $im, |
$coords, | |||
$c1, | |||
$c2, | |||
$a_x_ratio = 1 , |
|||
$a_y_ratio = 1 |
|||
) |
draws an outlined two color rectangle
int | $im | image identifier as returned by ImageCreateFromGIF() etc. |
string | $coords | coordinate string, format : "x1,y1,x2,y2" with (x1,y1) is top left and (x2,y2) is bottom right point of the rectangle |
int | $c1 | color identifier 1 |
int | $c2 | color identifier 2 |
Definition at line 536 of file class.ilMapArea.php.
References $coords, and drawLine().
Referenced by draw().
ilMapArea::getCoords | ( | ) |
ilMapArea::getExtTitle | ( | ) |
get link text (external link only)
Definition at line 405 of file class.ilMapArea.php.
References $xl_title.
ilMapArea::getHref | ( | ) |
get hyper reference url (external link only)
string | hyper ref url |
Definition at line 385 of file class.ilMapArea.php.
References $xl_href.
Referenced by create(), and update().
ilMapArea::getItemId | ( | ) |
ilMapArea::getLinkType | ( | ) |
get link type
Definition at line 365 of file class.ilMapArea.php.
References $linktype.
Referenced by create(), and update().
ilMapArea::getNr | ( | ) |
ilMapArea::getShape | ( | ) |
ilMapArea::getTarget | ( | $a_insert_inst = false | ) |
get link target (internal link only)
Definition at line 425 of file class.ilMapArea.php.
References $il_target.
Referenced by create(), and update().
ilMapArea::getTargetFrame | ( | ) |
get link target frame (internal link only)
Definition at line 475 of file class.ilMapArea.php.
References $il_target_frame.
Referenced by create(), and update().
ilMapArea::getTitle | ( | ) |
get (tooltip) title
Definition at line 345 of file class.ilMapArea.php.
References $title.
Referenced by create(), and update().
ilMapArea::getType | ( | ) |
get link type (internal link only)
Definition at line 453 of file class.ilMapArea.php.
References $il_type.
Referenced by create(), and update().
ilMapArea::ilMapArea | ( | $a_item_id = 0 , |
|
$a_nr = 0 |
|||
) |
map area
int | $a_item_id | parent media item id |
int | $a_nr | map area number within media item |
Definition at line 56 of file class.ilMapArea.php.
References read(), setItemId(), and setNr().
ilMapArea::read | ( | ) |
read map area data into object (item id and nr must be set)
Definition at line 112 of file class.ilMapArea.php.
References $ilDB, getItemId(), getNr(), setCoords(), setHref(), setLinkType(), setNr(), setShape(), setTarget(), setTargetFrame(), setTitle(), and setType().
Referenced by ilMapArea().
ilMapArea::setCoords | ( | $a_coords | ) |
set coords of area
string | $a_coords | coords (comma separated integers) |
Definition at line 305 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::setExtTitle | ( | $a_title | ) |
set link text (external link only)
string | $a_title | link text |
Definition at line 395 of file class.ilMapArea.php.
ilMapArea::setHref | ( | $a_href | ) |
set hyper reference (external link only)
string | $a_href | hyper ref url |
Definition at line 375 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::setItemId | ( | $a_item_id | ) |
set media item id
int | $a_item_id | media item id |
Definition at line 245 of file class.ilMapArea.php.
Referenced by ilMapArea().
ilMapArea::setLinkType | ( | $a_link_type | ) |
set link type
string | $a_linktype | link type (IL_INT_LINK, IL_EXT_LINK) |
Definition at line 355 of file class.ilMapArea.php.
Referenced by read(), and ilImageMapEditorGUI\saveArea().
ilMapArea::setNr | ( | $a_nr | ) |
set area number
int | $a_nr | number (of area within parent media object) |
Definition at line 265 of file class.ilMapArea.php.
Referenced by ilMapArea(), and read().
ilMapArea::setShape | ( | $a_shape | ) |
set shape (IL_AREA_RECT, IL_AREA_CIRCLE, IL_AREA_POLY, IL_AREA_WHOLE_PICTURE)
string | $a_shape | shape of map area |
Definition at line 285 of file class.ilMapArea.php.
Referenced by read(), and ilImageMapEditorGUI\saveArea().
ilMapArea::setTarget | ( | $a_target | ) |
set link target (internal link only)
string | $a_target | link target (e.g. "il__pg_23") |
Definition at line 415 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::setTargetFrame | ( | $a_target_frame | ) |
set link target frame (internal link only)
string | $a_target_frame | target frame (IL_TF_MEDIA | IL_TF_FAQ | IL_TF_GLOSSARY | IL_TF_NEW) |
Definition at line 464 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::setTitle | ( | $a_title | ) |
set (tooltip)title of area
string | $a_title | title |
Definition at line 325 of file class.ilMapArea.php.
Referenced by read(), and ilImageMapEditorGUI\updateAreas().
ilMapArea::setType | ( | $a_type | ) |
set link type (internal link only)
string | $a_type | link type (IL_LT_STRUCTURE | IL_LT_PAGE | IL_LT_MEDIA | IL_LT_GLITEM) |
Definition at line 443 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::update | ( | ) |
update map area
Definition at line 137 of file class.ilMapArea.php.
References $ilDB, getCoords(), getHref(), getItemId(), getLinkType(), getNr(), getShape(), getTarget(), getTargetFrame(), getTitle(), and getType().
ilMapArea::$coords |
Definition at line 40 of file class.ilMapArea.php.
Referenced by drawCircle(), drawPoly(), drawRect(), and getCoords().
ilMapArea::$il_target |
Definition at line 45 of file class.ilMapArea.php.
Referenced by getTarget().
ilMapArea::$il_target_frame |
Definition at line 47 of file class.ilMapArea.php.
Referenced by getTargetFrame().
ilMapArea::$il_type |
Definition at line 46 of file class.ilMapArea.php.
Referenced by getType().
ilMapArea::$item_id |
Definition at line 37 of file class.ilMapArea.php.
Referenced by _resolveIntLinks(), and getItemId().
ilMapArea::$linktype |
Definition at line 42 of file class.ilMapArea.php.
Referenced by getLinkType().
ilMapArea::$nr |
Definition at line 38 of file class.ilMapArea.php.
Referenced by _resolveIntLinks(), and getNr().
ilMapArea::$shape |
Definition at line 39 of file class.ilMapArea.php.
Referenced by getShape().
ilMapArea::$title |
Definition at line 41 of file class.ilMapArea.php.
Referenced by getTitle().
ilMapArea::$xl_href |
Definition at line 44 of file class.ilMapArea.php.
Referenced by getHref().
ilMapArea::$xl_title |
Definition at line 43 of file class.ilMapArea.php.
Referenced by getExtTitle().