Overview
TheEllipse class draws an ellipse shape. It extends the Graphics base class and provides separate radius controls for X and Y axes.
Class Definition
Settings Interface
Properties
The ellipse’s major-axis radius. Must be non-negative.
The ellipse’s minor-axis radius. Must be non-negative.
Inherited Properties
AsEllipse extends Graphics, it inherits all graphics properties including:
Stroke (border) color.Learn more about colors, gradients and patterns
Width of the stroke (border) in pixels.
Opacity of the fill. 0 - fully transparent; 1 - fully opaque.
Opacity of the stroke (border). 0 - fully transparent; 1 - fully opaque.
Fill pattern.Learn more about patterns
Stroke (border) pattern.Learn more about patterns
Fill gradient.Learn more about gradients
Stroke (border) gradient.Learn more about gradients
Stroke (border) dash settings.Learn more about dashed lines
Stroke (border) dash offset.Learn more about dashed lines
Rotation angle in degrees.
Color of the element’s shadow.For this to work at least one of the following needs to be set as well:
shadowBlur, shadowOffsetX, shadowOffsetY.Learn more about shadowsBlurriness of the shadow. The bigger the number, the more blurry shadow will be.Learn more about shadows
Horizontal shadow offset in pixels.Learn more about shadows
Vertical shadow offset in pixels.Learn more about shadows
Opacity of the shadow (0-1).If not set, will use the same as
fillOpacity of the element.Learn more about shadowsDrawing function.Must use renderer (
display parameter) methods to draw.Learn more about custom draw functionsDraw a shape using an SVG path.Learn more about SVG paths
Indicates if stroke of a Graphics should stay the same when its scale changes.Note: This doesn’t take into account parent container scale changes.
A method to be used on anchor points (joints) of the multi-point line.Learn more about lineJoin@since 5.2.10
This setting determines the shape used to draw the end points of lines.Learn more about lineCap@since 5.10.8
Example Usage
See Also
- Graphics documentation
- Circle - For circular shapes
- Polygon - For custom polygon shapes