Table of Contents

Class Ellipse

Namespace
LMKit.Graphics.Geometry
Assembly
LM-Kit.NET.dll

Represents an ellipse (or circle) defined by a center point and two radii. Immutable: all operations return new instances.

public sealed class Ellipse : IBounds, IEquatable<Ellipse>
Inheritance
Ellipse
Implements
Inherited Members

Constructors

Ellipse(double, double, double, double)

Initializes a new ellipse from a center point and two radii.

Properties

Area

Gets the area of the ellipse.

AxisAlignedBounds

Gets the axis-aligned bounding rectangle of the ellipse.

Bottom

Gets the vertical position of the bottom edge of the bounds.

Center

Gets the center of the ellipse as a Point.

CenterX

Gets the X-coordinate of the ellipse center.

CenterY

Gets the Y-coordinate of the ellipse center.

Height

Gets the total vertical extent of the bounds (Bottom minus Top).

IsCircle

Gets a value indicating whether this ellipse is a circle (both radii are equal within a small tolerance).

Left

Gets the horizontal position of the left edge of the bounds.

MidX

Gets the horizontal midpoint of the bounds.

MidY

Gets the vertical midpoint of the bounds.

RadiusX

Gets the horizontal radius of the ellipse.

RadiusY

Gets the vertical radius of the ellipse.

Right

Gets the horizontal position of the right edge of the bounds.

Top

Gets the vertical position of the top edge of the bounds.

Width

Gets the total horizontal extent of the bounds (Right minus Left).

Methods

Circle(Point, double)

Creates a circle from a center Point and radius.

Circle(double, double, double)

Creates a circle from a center point and radius.

Contains(double, double)

Determines whether the specified point lies inside this ellipse.

Equals(Ellipse)
Equals(object)
FromBounds(Rectangle)

Creates an ellipse inscribed within the specified bounding rectangle.

FromCenter(Point, double, double)

Creates an ellipse from a center Point and two radii.

FromCenter(double, double, double, double)

Creates an ellipse from a center point and two radii.

GetHashCode()
Scale(double, double)

Returns a new ellipse with its radii scaled by the specified factors.

ToString()

Returns Ellipse(CenterX, CenterY, RadiusX, RadiusY).

Translate(double, double)

Returns a new ellipse translated by the specified offsets.

Operators

operator ==(Ellipse, Ellipse)

Determines whether two ellipses are equal.

operator !=(Ellipse, Ellipse)

Determines whether two ellipses are not equal.