MarkupItem
- class Communicator.Markup.MarkupItem()
This is a base class for all markup items that are overlayed over the viewer. Inherit from this class or provide an identical interface when creating custom markup items.
Methods
Methods
draw
- Communicator.Markup.MarkupItem.draw()
Called when the markup item should be redrawn on the screen. This most typically happens when the scene is rendered.
- Return type
void
forJson
- Communicator.Markup.MarkupItem.forJson()
Note
forJson is deprecated: Use
toJson
instead.- Return type
Object
getClassName
- Communicator.Markup.MarkupItem.getClassName()
Gets the fully qualified class name for this markup item. E.g. “Communicator.Markup.Redline.RedlineCircle”
- Return type
string
- Returns
fully qualified class name
hit
- Communicator.Markup.MarkupItem.hit(point)
Called when a hit test is performed on this markup item.
- Arguments
point (
Communicator.Point2()
) – position in window where the hit test is being performed.
- Return type
boolean
- Returns
boolean value indicating whether this item was picked
hitWithTolerance
- Communicator.Markup.MarkupItem.hitWithTolerance(point, pickTolerance)
Called when a hit test is performed on this markup item.
- Arguments
point (
Communicator.Point2()
) – position in window where the hit test is being performed.pickTolerance (
number()
) – amount of tolerance allowed for a hit in pixels.
- Return type
boolean
- Returns
boolean value indicating whether this item was picked
onDeselect
- Communicator.Markup.MarkupItem.onDeselect()
Called when this markup item is deselected by the system
- Return type
void
onSelect
- Communicator.Markup.MarkupItem.onSelect()
Called when this markup item is selected by the system.
- Return type
void