Ellipse2d
The Ellipse2d class describes an ellipse in a plane. It is derived from the VisionElement base class.
Constructors
Empty constructor.
new Ellipse2d(): Ellipse2d;
Constructor with the coordinates of the center, the major and minor diameters, and the angle of rotation.
new Ellipse2d(centerX: number, centerY: number, diameterA: number, diameterB: number, angle?: number);
Constructor with the center, the major and minor diameters, and the angle of rotation.
new Ellipse2d(center: Point2d, diameterA: number, diameterB: number, angle?: number);
Methods
center()
Returns the center of the ellipse as a new point.
center(): Point2d;
isValid()
Returns true if the ellipse values are valid.
isValid(): boolean;
Value
centerX
The X coordinate of the center of the ellipse.
centerX: number;
centerY
The Y coordinate of the center of the ellipse.
centerY: number;
diameterA
The diameter of the major axis.
diameterA: number;
diameterB
The diameter of the minor axis.
diameterB: number;
angle
The angle between the major axis and the X axis.
angle: number;
Props
color
The color of the ellipse in hexadecimal format.
color: string;