Section 25.38. CanvasRenderingContext2D.strokeRect( ): draw a rectangle


25.38. CanvasRenderingContext2D.strokeRect( ): draw a rectangle

25.38.1. Synopsis

 void strokeRect(float x, float y,                 float width, float height) 

25.38.1.1. Arguments

x, y

The coordinates of the upper-left corner of the rectangle.


width, height

The dimensions of the rectangle.

25.38.2. 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.

Current implementations of strokeRect( ) clear the path as if beginPath( ) had been called. This surprising behavior may not be standardized and should not be relied upon.

25.38.3. See Also

CanvasRenderingContext2D.fillRect( )
CanvasRenderingContext2D.lineJoin
CanvasRenderingContext2D.rect( )
CanvasRenderingContext2D.stroke( )



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