Skip to main content
Ellipse(): Shape;
Ellipse takes no parameters. It creates an ellipse that fills the entire frame, stretching to fit both dimensions.

Methods

.fill(style)
(style: Style) => Shape
Fills the ellipse interior with a color, gradient, or other style.
.stroke(style)
(style: Style | StrokeOptions) => Shape
Draws the ellipse outline. Pass a Style for a 1-point stroke, or a StrokeOptions object ({ style: Style, lineWidth?: number }) for custom width.

Support

Usage

Basic ellipse

Ellipse()
    .fill(Color("orange"))
    .frame({ width: 200, height: 100 })

Stroked ellipse

Ellipse()
    .stroke(Color("blue"), 3)
    .frame({ width: 150, height: 80 })

With gradient fill

Ellipse()
    .fill(LinearGradient({
        colors: [Color("green"), Color("teal")]
    }))
    .frame({ width: 200, height: 120 })

Notes

  • When the frame is square, Ellipse renders identically to Circle.

See Also