Classes
Type Definitions
-
Options{Object}
-
Specify radius for regular polygons, or radius1 and radius2 for stars.
Properties:
Name Type Argument Default Description fillFill <optional>
Fill style.
pointsnumber Number of points for stars and regular polygons. In case of a polygon, the number of points is the number of sides.
radiusnumber <optional>
Radius of a regular polygon.
radius1number <optional>
First radius of a star. Ignored if radius is set.
radius2number <optional>
Second radius of a star.
anglenumber <optional>
0 Shape's angle in radians. A value of 0 will have one of the shape's points facing up.
displacementArray.<number> <optional>
[0, 0] Displacement of the shape in pixels. Positive values will shift the shape right and up.
strokeStroke <optional>
Stroke style.
rotationnumber <optional>
0 Rotation in radians (positive rotation clockwise).
rotateWithViewboolean <optional>
false Whether to rotate the shape with the view.
scalenumber | Size <optional>
1 Scale. Unless two dimensional scaling is required a better result may be obtained with appropriate settings for
radius,radius1andradius2.declutterMode"declutter" | "obstacle" | "none" | undefined <optional>
Declutter mode.
-
RenderOptions{Object}
-
Properties:
Name Type Argument Description strokeStyleColorLike <optional>
StrokeStyle.
strokeWidthnumber StrokeWidth.
sizenumber Size.
lineDashArray.<number> | null LineDash.
lineDashOffsetnumber LineDashOffset.
lineJoinCanvasLineJoin LineJoin.
miterLimitnumber MiterLimit.