Struct CircleF
Represents a circle that is composed of a single-precision floating-point center point and radius.
Namespace: X10D.Drawing
Assembly: X10D.dll
Syntax
public struct CircleF : IEquatable<CircleF>, IComparable<CircleF>, IComparable
Constructors
| Improve this Doc View SourceCircleF(PointF, Single)
Initializes a new instance of the CircleF struct.
Declaration
public CircleF(PointF center, float radius)
Parameters
Type | Name | Description |
---|---|---|
PointF | center | The center point of the circle. |
System.Single | radius | The radius of the circle. |
CircleF(Single, Single, Single)
Initializes a new instance of the CircleF struct.
Declaration
public CircleF(float centerX, float centerY, float radius)
Parameters
Type | Name | Description |
---|---|---|
System.Single | centerX | The X coordinate of the center point. |
System.Single | centerY | The Y coordinate of the center point. |
System.Single | radius | The radius of the circle. |
CircleF(Vector2, Single)
Initializes a new instance of the CircleF struct.
Declaration
public CircleF(Vector2 center, float radius)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | center | The center point of the circle. |
System.Single | radius | The radius of the circle. |
Fields
| Improve this Doc View SourceCircleF
The unit circle. That is, a circle whose center point is (0, 0) and whose radius is 1.
Declaration
public static readonly CircleF
Field Value
Type | Description |
---|---|
CircleF |
CircleF
The unit circle. That is, a circle whose center point is (0, 0) and whose radius is 1.
Declaration
public static readonly CircleF
Field Value
Type | Description |
---|---|
CircleF |
Empty
The empty circle. That is, a circle whose center point is (0, 0) and whose radius is 0.
Declaration
public static readonly CircleF Empty
Field Value
Type | Description |
---|---|
CircleF |
Unit
The unit circle. That is, a circle whose center point is (0, 0) and whose radius is 1.
Declaration
public static readonly CircleF Unit
Field Value
Type | Description |
---|---|
CircleF |
Properties
| Improve this Doc View SourceArea
Gets the area of the circle.
Declaration
public float Area { get; }
Property Value
Type | Description |
---|---|
System.Single | The area of the circle, calculated as |
Center
Gets the center point of the circle.
Declaration
public PointF Center { get; }
Property Value
Type | Description |
---|---|
PointF | The center point. |
Circumference
Gets the circumference of the circle.
Declaration
public float Circumference { get; }
Property Value
Type | Description |
---|---|
System.Single | The circumference of the circle, calculated as |
Diameter
Gets the diameter of the circle.
Declaration
public float Diameter { get; }
Property Value
Type | Description |
---|---|
System.Single | The diameter. This is always twice the Radius. |
Radius
Gets the radius of the circle.
Declaration
public float Radius { get; }
Property Value
Type | Description |
---|---|
System.Single | The radius. |
Methods
| Improve this Doc View SourceCompareTo(Nullable<Object>)
Compares this instance to another CircleF.
Declaration
public int CompareTo(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj | The other object. |
Returns
Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
System.Int32 | A signed number indicating the relative values of this instance and
|
Remarks
Comparison only takes into consideration the Radius.
CompareTo(CircleF)
Compares this instance to another CircleF.
Declaration
public int CompareTo(CircleF other)
Parameters
Type | Name | Description |
---|---|---|
CircleF | other | The other circle. |
Returns
Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
System.Int32 | A signed number indicating the relative values of this instance and
|
Remarks
Comparison only takes into consideration the Radius.
Equals(Nullable<Object>)
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(CircleF)
Returns a value indicating whether this instance and another instance are equal.
Declaration
public bool Equals(CircleF other)
Parameters
Type | Name | Description |
---|---|---|
CircleF | other | The instance with which to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if this instance and |
FromCircle(Circle)
Declaration
public static CircleF FromCircle(Circle circle)
Parameters
Type | Name | Description |
---|---|---|
Circle | circle | The circle to convert. |
Returns
Type | Description |
---|---|
CircleF | The converted circle. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Operators
| Improve this Doc View SourceEquality(CircleF, CircleF)
Returns a value indicating whether two instances of CircleF are equal.
Declaration
public static bool operator ==(CircleF left, CircleF right)
Parameters
Type | Name | Description |
---|---|---|
CircleF | left | The first instance. |
CircleF | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
GreaterThan(CircleF, CircleF)
Returns a value indicating whether the radius of one circle is greater than to that of another.
Declaration
public static bool operator>(CircleF left, CircleF right)
Parameters
Type | Name | Description |
---|---|---|
CircleF | left | The first instance. |
CircleF | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the Radius of |
GreaterThanOrEqual(CircleF, CircleF)
Returns a value indicating whether the radius of one circle is greater than or equal to that of another.
Declaration
public static bool operator >=(CircleF left, CircleF right)
Parameters
Type | Name | Description |
---|---|---|
CircleF | left | The first instance. |
CircleF | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the Radius of |
Implicit(Circle to CircleF)
Declaration
public static implicit operator CircleF(Circle circle)
Parameters
Type | Name | Description |
---|---|---|
Circle | circle | The circle to convert. |
Returns
Type | Description |
---|---|
CircleF | The converted circle. |
Inequality(CircleF, CircleF)
Returns a value indicating whether two instances of CircleF are not equal.
Declaration
public static bool operator !=(CircleF left, CircleF right)
Parameters
Type | Name | Description |
---|---|---|
CircleF | left | The first instance. |
CircleF | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
LessThan(CircleF, CircleF)
Returns a value indicating whether the radius of one circle is less than that of another.
Declaration
public static bool operator <(CircleF left, CircleF right)
Parameters
Type | Name | Description |
---|---|---|
CircleF | left | The first instance. |
CircleF | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the Radius of |
LessThanOrEqual(CircleF, CircleF)
Returns a value indicating whether the radius of one circle is less than or equal to that of another.
Declaration
public static bool operator <=(CircleF left, CircleF right)
Parameters
Type | Name | Description |
---|---|---|
CircleF | left | The first instance. |
CircleF | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the Radius of |