December 2010
Intermediate to advanced
110 pages
2h 31m
English
CRC.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 first point of the subpath. It then begins a new
subpath (as if by calling moveTo()) at that same
point.
fill() and clip() treat all
subpaths as if they had been closed, so you only need to call
closePath() explicitly if you want to
stroke() a closed path.
Read now
Unlock full access