MarkupItem
- class 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.
Constructors
Constructors
- MarkupItem.constructor()
- Return type
MarkupItem
Methods
draw
- MarkupItem.draw(_renderer, _view)
- Arguments
_renderer (
MarkupRenderer()
) – None_view (
View()
) – None
Called when the markup item should be redrawn on a specific view. This most typically happens when the scene is rendered.
- Return type
void
getClassName
- MarkupItem.getClassName()
Gets the fully qualified class name for this markup item. E.g. “Communicator.Markup.Redline.RedlineCircle”
- Returns
fully qualified class name
- Return type
string
hit
hitWithTolerance
onDeselect
- MarkupItem.onDeselect()
Called when this markup item is deselected by the system
- Return type
void
onSelect
- MarkupItem.onSelect()
Called when this markup item is selected by the system.
- Return type
void
remove
- MarkupItem.remove()
Called when the MarkupItem is removed from the system. Any cleanup that needs to be done should be performed in this method.
- Return type
void
toJson
- MarkupItem.toJson()
Creates an object ready for JSON serialization.
- Returns
The prepared object.
- Return type
object