Name
CRC.strokeRect() — draws a rectangle
Synopsis
void strokeRect(floatx
, floaty
, floatwidth
, floatheight
)
Arguments
x, y
The coordinates of the upper-left corner of the rectangle
width, height
The dimensions of the rectangle
Description
This method draws the outline (but does not fill the interior) of
a rectangle with the specified position and size. Line color and line
width are specified by the strokeStyle
and
lineWidth
properties. The appearance of the rectangle
corners are specified by the lineJoin
property.
Unlike the rect()
method,
strokeRect()
has no effect on the current path or the
current point.
See Also
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.