Skip to content
mohayonao edited this page Aug 11, 2014 · 7 revisions

ellipse

Draws an ellipse(oval) to the canvas.

Examples

canvas.stroke(10).noFill()
  .ellipse(50, 50, 40, 20);

canvas.noStroke().fill([ 3, 11, 6 ])
  .ellipse(150, 50, 20, 40);

canvas.stroke(12).fill(4)
  .ellipse(250, 50, 40, 20);

Syntax

canvas.ellipse(cx, cy, rx, ry);

Parameters

  • cx: int
    • x-coordinate of the ellipse
  • cy: int
    • x-coordinate of the ellipse
  • rx: int
    • width of the ellipse
  • ry: int -height of the ellipse

Returns

Canvas: self for method chaining

Related