Ellipse class

An ellipse defined by its center and two radii.

radiusX is the semi-major or semi-minor axis along the x-axis, radiusY is along the y-axis.

Implemented types

Constructors

Ellipse({required Point center, required double radiusX, required double radiusY})
const
Ellipse.circular({required Point center, required double radius})
Create a circle-like ellipse with equal radii
factory

Properties

area double
Get area of ellipse
no setteroverride
center Point
Center point of the ellipse
final
eccentricity double
Eccentricity of the ellipse (0 = circle, approaching 1 = very elongated)
no setter
focalDistance double
Distance from center to each focus
no setter
foci List<Point>
The two foci of the ellipse
no setter
hashCode int
The hash code for this object.
no setteroverride
isCircle bool
Whether this ellipse is a circle (equal radii)
no setter
perimeter double
Get perimeter of ellipse (Ramanujan approximation)
no setteroverride
radiusX double
Semi-axis length along the x-axis
final
radiusY double
Semi-axis length along the y-axis
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semiMajor double
The semi-major axis (longer radius)
no setter
semiMinor double
The semi-minor axis (shorter radius)
no setter

Methods

contains(Point point) bool
Check if a point is inside this ellipse
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pointAt(double angle) Point
Get a point on the ellipse boundary at the given angle in radians
rotate(double deg) Ellipse
Rotate the shape by deg degrees
override
scale(double value) Ellipse
scale the shape by value
override
toString() String
A string representation of this object.
override
translate({double x = 0, double y = 0}) Ellipse
translate the shape with x in horizontally and y vertically
override

Operators

operator ==(Object other) bool
The equality operator.
override