HTML and CSS Reference
In-Depth Information
Figure 7-8. A triangle drawn using the canvas path drawing methods
Note If the beginPath() and closePath() methods are omitted, the lines
won't be automatically closed to form a shape, which may be desired in cases where
you just want to have lines without a fill.
In place of the lineTo() method, the arcTo() , bezierCurveTo() , or quad-
raticCurveTo() methods could be used to create shapes with curved edges.
Additionally, the lineCap and lineJoin properties can be set to affect how the
end of line segments and the join points of each segment appear. The lineCap property
can be set to butt , round , or square to change the end of a line. The lineJoin
can be set to miter , round , or bevel to affect the shape of the join point of two line
segments ( Figure 7-9 ). When set to miter , another property, miterLimit , can be
used to specify the angle over which a point will be formed.
Search WWH ::

Custom Search