August 2006
Intermediate to advanced
1018 pages
34h 13m
English
CanvasRenderingContext2D.closePath( ): closes an open subpath
void closePath( )
If the current subpath of the canvas is open, closePath( ) closes it by adding a line
connecting the current point to the subpath’s starting point. If the
subpath is already closed, this method does nothing. Once a subpath
is closed, no more lines or curves can be added to it. To continue
adding to the path, you must begin a new subpath with a call to
moveTo( ).
You do not need to call closePath(
) before stroking or filling a path. Paths are implicitly
closed when filled (and also when you call clip( )).
CanvasRenderingContext2D.beginPath(
)
|
CanvasRenderingContext2D.moveTo(
)
|
CanvasRenderingContext2D.stroke(
)
|
CanvasRenderingContext2D.fill(
)
|
Read now
Unlock full access