Extends: Node
fill
property paints the interior of the given
graphical element. The area to be painted consists of any areas inside
the outline of the node's shape.
stroke
property paints along the outline of the given
graphical element.
strokeDashArray
controls the pattern of dashes and gaps
used to stroke paths. This attribute contains a list of lengths that
specify the lengths of alternating dashes and gaps. If an odd number
of values is provided, then the list of values is repeated to yield an
even number of values. Thus, strokeDashArray: [5,3,2] is equivalent to
strokeDashArray: [5,3,2,5,3,2]. Defaults to [].
strokeDashOffset
specifies the distance into the dash
pattern to start the dash. Defaults to 0.0.
strokeLineCap
specifies the shape to be used at the end
of open subpaths when they are stroked. Defaults to SQUARE
.
strokeLineJoin
specifies the shape to be used at the
corners of paths or basic shapes when they are stroked. Defaults to
MITER
.
When two line segments meet at a sharp angle and miter joins have been specified for 'stroke-linejoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The 'strokeMiterLimit' imposes a limit on the ratio of the miter length to the 'strokeWidth'. When the limit is exceeded, the join is converted from a miter to a bevel.
strokeMiterLimit
The limit on the ratio of the miter length to the 'strokeWidth'. The
value of
The ratio of miter length (distance between the outer tip and the inner corner of the miter) to 'strokeWidth' is directly related to the angle (theta) between the segments in user space by the formula:
miterLength / strokeWidth = 1 / sin(theta/2)
For example, a miter limit of 1.414 converts miters to bevels for theta less than 90 degrees, a limit of 4.0 converts them for theta less than approximately 29 degrees, and a limit of 10.0 converts them for theta less than approximately 11.5 degrees.