Section 25.18. CanvasRenderingContext2D.closePath( ): closes an open subpath


25.18. CanvasRenderingContext2D.closePath( ): closes an open subpath

25.18.1. Synopsis

 void closePath( ) 

25.18.2. Description

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( )).

25.18.3. See Also

CanvasRenderingContext2D.beginPath( )
CanvasRenderingContext2D.moveTo( )
CanvasRenderingContext2D.stroke( )
CanvasRenderingContext2D.fill( )



JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net