Name
CanvasRenderingContext2D.miterLimit: maximum-miter-length-to-line-width ratio
Synopsis
float miterLimit
Description
When wide lines are drawn with the lineJoin property set to “miter” and two
lines meet at an acute angle, the resulting miter can be quite long.
When miters are too long, they become visually jarring. This
miterLimit property places an
upper bound on the length of the miter. This property expresses a
ratio of the miter length to the line width. The default value is
10, which means that a miter should never be longer than 10 times
the line width. If a miter reaches this length, it is beveled off.
This property has no effect when lineJoin is “round” or “bevel”.
Bugs
Firefox 1.5 does not correctly implement this property. When a
mitered join exceeds the miterLimit, the join is converted to a
rounded join instead.
See Also
CanvasRenderingContext2D.lineJoin
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access