Section 25.26. CanvasRenderingContext2D.lineCap: specifies how the ends of lines are rendered


25.26. CanvasRenderingContext2D.lineCap: specifies how the ends of lines are rendered

25.26.1. Synopsis

 String lineCap 

25.26.2. Description

The lineCap property specifies how lines should be terminated. It matters only when drawing wide lines. Legal values for this property are listed in the following table. The default value is "butt".

Value

Meaning

"butt"

This default value specifies that the line should have no cap. The end of the line is straight and is perpendicular to the direction of the line. The line is not extended beyond its endpoint.

"round"

This value specifies that lines should be capped with a semicircle whose diameter is equal to the width of the line and which extends beyond the end of the line by one half the width of the line.

"square"

This value specifies that lines should be capped with a rectangle. This value is like "butt", but the line is extended by half of its width.


25.26.3. Bugs

Firefox 1.5 does not properly implement the "butt" cap style. Butt caps are rendered as if they were "square" line caps.

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