Adds points to a path that represents an arc.
HRESULT arc( float x, float y, float radius, float startAngle, float endAngle, BOOL anticlockwise );
- [in] The x-coordinate, in pixels, for the center point of the arc in relation to the upper-left corner of the canvas rectangle.
- [in] The y-coordinate, in pixels, for the center point of the arc in relation to the upper-left corner of the canvas rectangle.
- [in] The radius or distance from the point (x,y) that the arc's path follows.
- [in] The starting angle, in radians, where 0 is at the 3 o'clock position of the arc's circle.
- [in] The ending angle, in radians.
- The arc is drawn in a counterclockwise direction from start to end.
- The arc is drawn in a clockwise direction from start to end.
Returns one of the following values.
S_OK The operation completed successfully. W3CException_DOM_INDEX_SIZE_ERR The specified radius value is negative.
If the startAngle and endAngle angles are equal, the ICanvasRenderingContext2D::arc method creates a circle. To convert degrees to radians use the following formula.var radians = degrees * Math.PI/180