HTML and CSS Reference
In-Depth Information
square
A rectangle with the length of the line width and the height of half the line width, placed
flat and perpendicular to the edge of the line.
lineJoin attributes
context.lineJoin
The
lineJoin
is the “corner” that is created when two lines meet. This is called a
join
. A
filledtriangleiscreatedatthejoin,andwecansetitsbasicpropertieswiththe
lineJoin
Can-
vas attribute:
miter
The default; an edge is drawn at the join. The
miterLimit
is the maximum allowed ratio
of miter length to line width. (The default is 10.)
bevel
bevel
A diagonal edge is drawn at the join.
round
A round edge is drawn at the join.
lineWidth
The
lineWidth
(default = 1.0) depicts the thickness of the line.
strokeStyle
The
strokeStyle
defines the color or style that will be used for lines and around shapes (as
we saw with the simple rectangles in
Example 2-2
).