25.18. CanvasRenderingContext2D.closePath( ): closes an open subpath25.18.1. Synopsisvoid closePath( ) 25.18.2. DescriptionIf 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( )). 25.18.3. See Also
|