Name

CRC.lineCap — specifies how the ends of lines are rendered

Synopsis

String lineCap

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”:

ValueMeaning
"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 that 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.

See Also

CRC.lineJoin

Get Canvas Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.