ellipse method

Adds points to a path that represents an ellipse. Equivalent to the arc method when the two radii are equal.

HTML Canvas 2D Context level 2

 

Syntax

CanvasRenderingContext2D.ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);

Parameters

x [in]

Type: number

The x-coordinate, in pixels, for the center point of the ellipse in relation to the upper-left corner of the canvas rectangle.

y [in]

Type: number

The y-coordinate, in pixels, for the center point of the ellipse in relation to the upper-left corner of the canvas rectangle.

radiusX [in]

Type: number

The major-axis radius of the ellipse.

radiusY [in]

Type: number

The minor-axis radius of the ellipse.

rotation [in]

Type: number

The rotation, in degrees, for the ellipse.

startAngle [in]

Type: number

The starting angle, in radians, measured from the x-axis.

endAngle [in]

Type: number

The ending angle, in radians.

anticlockwise [in]

Type: BOOL

true

The ellipse is drawn in a counterclockwise direction from start to end.

false

The ellipse is drawn in a clockwise direction from start to end.

Return value

This method does not return a value.

Standards information

See also

CanvasRenderingContext2D

 

 

Show: