x coordinate of the marker's center.
y coordinate of the marker's center.
SVG container object holding the marker's visual.
Fill color of the marker.
In a derived class override applyFillColor to apply the color to the marker's visual.
For bitmap images this holds the base64 encoded image.
Technically this could be any URL but due to browser security constraints an external image will almost certainly cause bitmap rendering of the image to fail.
In cases you know you will never render the annotation as a static image, it should be safe to use external URLs. Otherwise, use base64 encoded images like 'data:image/png;base64,...'.
Opacity of the marker.
In a derived class override applyOpacity to apply the opacity to the marker's visual.
Stroke (outline) color of the marker.
In a derived class override applyStrokeColor to apply the color to the marker's visual.
Stroke (outline) dash array of the marker.
In a derived class override applyStrokeDasharray to apply the dash array to the marker's visual.
Stroke (outline) width of the marker.
In a derived class override applyStrokeWidth to apply the width to the marker's visual.
For SVG images this holds the SVG markup of the image.
Returns marker type name for the object instance.
ProtectedvisualContainer for the marker's visual.
ProtectedaddAdjusts the image size and position.
Adjusts marker's visual according to the current state (color, width, etc.).
ProtectedapplyApplies the fill color to the marker's visual.
Override this method in a derived class to apply the color to the marker's visual.
ProtectedapplyApplies the opacity to the marker's visual.
Override this method in a derived class to apply the opacity to the marker's visual
ProtectedapplyApplies the stroke color to the marker's visual.
Override this method in a derived class to apply the color to the marker's visual.
ProtectedapplyApplies the stroke dash array to the marker's visual.
Override this method in a derived class to apply the dash array to the marker's visual.
ProtectedapplyApplies the stroke width to the marker's visual.
Override this method in a derived class to apply the width to the marker's visual.
ProtectedcreateCreates the image element based on the image type and source.
Creates marker's visual, including its image element.
Disposes the marker and cleans up.
Returns markers bounding box.
Override to return a custom bounding box.
rectangle fitting the marker.
When overridden in a derived class, represents a preliminary outline for markers that can be displayed before the marker is actually created.
SVG path string.
Returns current marker state that can be restored in the future.
Moves visual to the specified coordinates.
coordinates of the new top-left corner of the visual.
Returns true if passed SVG element belongs to the marker. False otherwise.
target element.
true if the element belongs to the marker.
Restores previously saved marker state.
previously saved state.
Rotates marker around the center.
coordinates of the rotation point.
Scales marker. Used after resize.
horizontal scale
vertical scale
Adjusts marker's size.
Protected_containerSVG container object holding the marker's visual.
It is created and passed to the constructor by marker editor or viewer when creating the marker.
Protected_fillFill color of the marker.
Protected Optional_imageFor bitmap images this holds the base64 encoded image.
Protected_opacityOpacity of the marker.
Protected_strokeStroke (outline) color of the marker.
Protected_strokeStroke (outline) dash array of the marker.
Protected_strokeStroke (outline) width of the marker.
Protected Optional_svgFor SVG images this holds the SVG markup of the image.
StaticapplyWhen true, the default filter is applied to the marker's visual.
The default marker size when the marker is created with a click (without dragging).
Marker height.
ProtectedimageType of the image: SVG or bitmap.
x coordinate of the top-left corner.
ProtectednaturalNatural (real) height of the image.
ProtectednaturalNatural (real) width of the image.
OptionalnotesAdditional information about the marker.
Generally, this isn't used for anything functional. However, in a derived type it could be used for storing arbitrary data with no need to create extra properties and state types.
Marker's rotation angle.
Marker lifecycle stage.
Most markers are created immediately after the user clicks on the canvas (normal).
However, some markers are only finished creating after additional interactions (creating).
Protected OptionalSVGImageMain SVG or image element of the marker.
StatictitleMarker type title (display name) used for accessibility and other attributes.
y coordinate of the top-left corner.
StatictypeMarker type name.
It's important to set this in each derived class. This value is used to identify marker types when restoring marker state and other scenarios.
Marker width.
Used to represent user-set images.
Use this marker to display custom images at runtime. For example, you can use this type to represent emojis selected in an emoji picker.