Section 25.12. CanvasRenderingContext2D.arc( ): add an arc to the current subpath of a canvas, using a center point and radius


25.12. CanvasRenderingContext2D.arc( ): add an arc to the current subpath of a canvas, using a center point and radius

25.12.1. Synopsis

 void arc(float x, float y, float radius, float startAngle, endAngle, boolean counterclockwise) 

25.12.1.1. Arguments

x, y

The coordinates of the center of the circle describing the arc.


radius

The radius of the circle describing the arc.


startAngle, endAngle

The angles that specify the start and end points of the arc along the circle. These angles are measured in radians. The three o'clock position along the positive X axis is an angle of 0, and angles increase in the clockwise direction.


counterclockwise

Whether the arc is traversed counterclockwise (true) or clockwise (false) along the circle's circumference.

25.12.2. Description

The first five arguments to this method describe specify a start point and an end point on the circumference of a circle. Invoking this method adds a straight line between the current point and the start point to the current subpath. Next it adds the arc along the circumference of the circle between the start and end points to the subpath. The final argument specifies the direction in which the circle should be traversed to connect the start and end points. This method leaves the current point set to the end point of the arc.

25.12.3. See Also

CanvasRenderingContext2D.arcTo( )
CanvasRenderingContext2D.beginPath( )
CanvasRenderingContext2D.closePath( )



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