Struct Ellipse
Represents an ellipse that is composed of a 32-bit signed integer center point and radius.
Implements
Namespace: X10D.Drawing
Assembly: X10D.dll
Syntax
public struct Ellipse : IEquatable<Ellipse>
Constructors
| Improve this Doc View SourceEllipse(Point, Size)
Initializes a new instance of the Ellipse struct.
Declaration
public Ellipse(Point center, Size radius)
Parameters
Type | Name | Description |
---|---|---|
Point | center | The center point of the ellipse. |
Size | radius | The radius of the ellipse. |
Ellipse(Int32, Int32, Int32, Int32)
Initializes a new instance of the Ellipse struct.
Declaration
public Ellipse(int centerX, int centerY, int horizontalRadius, int verticalRadius)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | centerX | The X coordinate of the center point. |
System.Int32 | centerY | The Y coordinate of the center point. |
System.Int32 | horizontalRadius | The horizontal radius of the ellipse. |
System.Int32 | verticalRadius | The vertical radius of the ellipse. |
Fields
| Improve this Doc View SourceEllipse
The unit ellipse. That is, an ellipse whose center point is (0, 0) and whose two radii are 1.
Declaration
public static readonly Ellipse
Field Value
Type | Description |
---|---|
Ellipse |
Ellipse
The unit ellipse. That is, an ellipse whose center point is (0, 0) and whose two radii are 1.
Declaration
public static readonly Ellipse
Field Value
Type | Description |
---|---|
Ellipse |
Ellipse
The unit ellipse. That is, an ellipse whose center point is (0, 0) and whose two radii are 1.
Declaration
public static readonly Ellipse
Field Value
Type | Description |
---|---|
Ellipse |
Empty
The empty ellipse. That is, an ellipse whose center point is (0, 0) and whose two radii are 0.
Declaration
public static readonly Ellipse Empty
Field Value
Type | Description |
---|---|
Ellipse |
Unit
The unit ellipse. That is, an ellipse whose center point is (0, 0) and whose two radii are 1.
Declaration
public static readonly Ellipse Unit
Field Value
Type | Description |
---|---|
Ellipse |
Properties
| Improve this Doc View SourceApproximateCircumference
Gets the approximate circumference of the ellipse.
Declaration
public float ApproximateCircumference { get; }
Property Value
Type | Description |
---|---|
System.Single | The approximate circumference of the ellipse, calculated as
|
Area
Gets the area of the ellipse.
Declaration
public float Area { get; }
Property Value
Type | Description |
---|---|
System.Single | The area of the ellipse, calculated as |
Center
Gets the center point of the ellipse.
Declaration
public Point Center { get; }
Property Value
Type | Description |
---|---|
Point | The center point. |
HorizontalRadius
Gets the horizontal radius of the ellipse.
Declaration
public int HorizontalRadius { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The horizontal radius. |
Radius
Gets the radius of the ellipse.
Declaration
public Size Radius { get; }
Property Value
Type | Description |
---|---|
Size | The radius. |
VerticalRadius
Gets the vertical radius of the ellipse.
Declaration
public int VerticalRadius { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The vertical radius. |
Methods
| Improve this Doc View SourceEquals(Nullable<Object>)
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Ellipse)
Returns a value indicating whether this instance and another instance are equal.
Declaration
public bool Equals(Ellipse other)
Parameters
Type | Name | Description |
---|---|---|
Ellipse | other | The instance with which to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if this instance and |
FromCircle(Circle)
Declaration
public static Ellipse FromCircle(in Circle circle)
Parameters
Type | Name | Description |
---|---|---|
Circle | circle | The circle to convert. |
Returns
Type | Description |
---|---|
Ellipse | The converted ellipse. |
FromEllipseF(EllipseF)
Declaration
public static Ellipse FromEllipseF(in EllipseF ellipse)
Parameters
Type | Name | Description |
---|---|---|
EllipseF | ellipse | The ellipse to convert. |
Returns
Type | Description |
---|---|
Ellipse | The converted ellipse. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Operators
| Improve this Doc View SourceEquality(Ellipse, Ellipse)
Returns a value indicating whether two instances of Ellipse are equal.
Declaration
public static bool operator ==(in Ellipse left, in Ellipse right)
Parameters
Type | Name | Description |
---|---|---|
Ellipse | left | The first instance. |
Ellipse | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Explicit(EllipseF to Ellipse)
Declaration
public static explicit operator Ellipse(in EllipseF ellipse)
Parameters
Type | Name | Description |
---|---|---|
EllipseF | ellipse | The ellipse to convert. |
Returns
Type | Description |
---|---|
Ellipse | The converted ellipse. |
Implicit(Circle to Ellipse)
Declaration
public static implicit operator Ellipse(in Circle circle)
Parameters
Type | Name | Description |
---|---|---|
Circle | circle | The circle to convert. |
Returns
Type | Description |
---|---|
Ellipse | The converted ellipse. |
Inequality(Ellipse, Ellipse)
Returns a value indicating whether two instances of Ellipse are not equal.
Declaration
public static bool operator !=(in Ellipse left, in Ellipse right)
Parameters
Type | Name | Description |
---|---|---|
Ellipse | left | The first instance. |
Ellipse | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if |