ILIAS
Release_4_4_x_branch Revision 61816
|
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 | |
getAllHighlightModes () | |
Get all highlight modes. | |
setHighlightMode ($a_val) | |
Set highlight mode. | |
getHighlightMode () | |
Get highlight mode. | |
getAllHighlightClasses () | |
Get all highlight classes. | |
setHighlightClass ($a_val) | |
Set highlight class. | |
getHighlightClass () | |
Get highlight class. | |
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 | |
const | HL_NONE = "" |
const | HL_HOVER = "Hover" |
const | HL_ALWAYS = "Always" |
const | HLCL_ACCENTED = "" |
const | HLCL_LIGHT = "Light" |
const | HLCL_DARK = "Dark" |
$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 36 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 207 of file class.ilMapArea.php.
References 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 107 of file class.ilMapArea.php.
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 236 of file class.ilMapArea.php.
References $mobs, and ilMediaItem\_lookupMobId().
Referenced by ilLMObject\updateInternalLinks().
ilMapArea::_resolveIntLinks | ( | $a_item_id | ) |
resolve internal links of an item id
Definition at line 172 of file class.ilMapArea.php.
References $item_id, $nr, $query, 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 426 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 706 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 78 of file class.ilMapArea.php.
References getCoords(), getHighlightClass(), getHighlightMode(), 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 576 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 690 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 609 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 652 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 627 of file class.ilMapArea.php.
References $coords, and drawLine().
Referenced by draw().
ilMapArea::getAllHighlightClasses | ( | ) |
Get all highlight classes.
@return |
Definition at line 300 of file class.ilMapArea.php.
References $lng.
Referenced by ilImageMapTableGUI\__construct().
ilMapArea::getAllHighlightModes | ( | ) |
Get all highlight modes.
@return |
Definition at line 261 of file class.ilMapArea.php.
References $lng.
Referenced by ilImageMapTableGUI\__construct().
ilMapArea::getCoords | ( | ) |
ilMapArea::getExtTitle | ( | ) |
get link text (external link only)
Definition at line 496 of file class.ilMapArea.php.
References $xl_title.
ilMapArea::getHighlightClass | ( | ) |
Get highlight class.
Definition at line 326 of file class.ilMapArea.php.
Referenced by create(), and update().
ilMapArea::getHighlightMode | ( | ) |
Get highlight mode.
Definition at line 289 of file class.ilMapArea.php.
Referenced by create(), and update().
ilMapArea::getHref | ( | ) |
get hyper reference url (external link only)
string | hyper ref url |
Definition at line 476 of file class.ilMapArea.php.
References $xl_href.
Referenced by create(), and update().
ilMapArea::getItemId | ( | ) |
ilMapArea::getLinkType | ( | ) |
get link type
Definition at line 456 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 516 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 566 of file class.ilMapArea.php.
References $il_target_frame.
Referenced by create(), and update().
ilMapArea::getTitle | ( | ) |
get (tooltip) title
Definition at line 436 of file class.ilMapArea.php.
References $title.
Referenced by create(), and update().
ilMapArea::getType | ( | ) |
get link type (internal link only)
Definition at line 544 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 64 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 122 of file class.ilMapArea.php.
References getItemId(), getNr(), setCoords(), setHighlightClass(), setHighlightMode(), 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 396 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 486 of file class.ilMapArea.php.
ilMapArea::setHighlightClass | ( | $a_val | ) |
Set highlight class.
string | $a_val | highlight class |
Definition at line 316 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::setHighlightMode | ( | $a_val | ) |
Set highlight mode.
string | $a_val | highlight mode |
Definition at line 279 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::setHref | ( | $a_href | ) |
set hyper reference (external link only)
string | $a_href | hyper ref url |
Definition at line 466 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 336 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 446 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 356 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 376 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 506 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 555 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::setTitle | ( | $a_title | ) |
set (tooltip)title of area
string | $a_title | title |
Definition at line 416 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 534 of file class.ilMapArea.php.
Referenced by read().
ilMapArea::update | ( | ) |
update map area
Definition at line 150 of file class.ilMapArea.php.
References getCoords(), getHighlightClass(), getHighlightMode(), getHref(), getItemId(), getLinkType(), getNr(), getShape(), getTarget(), getTargetFrame(), getTitle(), and getType().
ilMapArea::$coords |
Definition at line 48 of file class.ilMapArea.php.
Referenced by drawCircle(), drawPoly(), drawRect(), and getCoords().
ilMapArea::$il_target |
Definition at line 53 of file class.ilMapArea.php.
Referenced by getTarget().
ilMapArea::$il_target_frame |
Definition at line 55 of file class.ilMapArea.php.
Referenced by getTargetFrame().
ilMapArea::$il_type |
Definition at line 54 of file class.ilMapArea.php.
Referenced by getType().
ilMapArea::$item_id |
Definition at line 45 of file class.ilMapArea.php.
Referenced by _resolveIntLinks(), and getItemId().
ilMapArea::$linktype |
Definition at line 50 of file class.ilMapArea.php.
Referenced by getLinkType().
ilMapArea::$nr |
Definition at line 46 of file class.ilMapArea.php.
Referenced by _resolveIntLinks(), and getNr().
ilMapArea::$shape |
Definition at line 47 of file class.ilMapArea.php.
Referenced by getShape().
ilMapArea::$title |
Definition at line 49 of file class.ilMapArea.php.
Referenced by getTitle().
ilMapArea::$xl_href |
Definition at line 52 of file class.ilMapArea.php.
Referenced by getHref().
ilMapArea::$xl_title |
Definition at line 51 of file class.ilMapArea.php.
Referenced by getExtTitle().
const ilMapArea::HL_ALWAYS = "Always" |
Definition at line 40 of file class.ilMapArea.php.
const ilMapArea::HL_HOVER = "Hover" |
Definition at line 39 of file class.ilMapArea.php.
const ilMapArea::HL_NONE = "" |
Definition at line 38 of file class.ilMapArea.php.
const ilMapArea::HLCL_ACCENTED = "" |
Definition at line 41 of file class.ilMapArea.php.
const ilMapArea::HLCL_DARK = "Dark" |
Definition at line 43 of file class.ilMapArea.php.
const ilMapArea::HLCL_LIGHT = "Light" |
Definition at line 42 of file class.ilMapArea.php.