Section 25.29. CanvasRenderingContext2D.miterLimit: maximum-miter-length-to-line-width ratio


25.29. CanvasRenderingContext2D.miterLimit: maximum-miter-length-to-line-width ratio

25.29.1. Synopsis

 float miterLimit 

25.29.2. 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".

25.29.3. 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.

25.29.4. See Also

CanvasRenderingContext2D.lineJoin




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net