DrawingStyle
The DrawingStyle
defines the visual appearance of annotations in Annotorious. You
can set the style via the setStyle method of your annotator instance.
To reset the style to the defaults, clear the style like so:
DrawingStyle
fill
- Type: Color
- Optional
The fill color of the annotation. Must be specified in HEX format.
fillOpacity
- Type:
number
- Optional
The opacity of the annotation fill, ranging from 0 (fully transparent) to 1 (fully opaque).
stroke
- Type: Color
- Optional
The stroke (outline) color of the annotation. Must be specified in HEX format.
strokeOpacity
- Type:
number
- Optional
The opacity of the annotation stroke, ranging from 0 (fully transparent) to 1 (fully opaque).
strokeWidth
- Type:
number
- Optional
The width of the annotation stroke in pixels.
Dynamic Styles
In addition to static DrawingStyle
objects, setStyle
also accepts
functions that return a DrawingStyle
. You can use this to implement
data-driven styles for your annotations.