CircleF

References
Adds a Circle type to the Eto.Drawing namespace.

Constructors

CircleF

#
public CircleF(float centreX, float centreY, float radius)
Create a new Circle.
centreX (float)Centre point x.
centreY (float)Centre point y.
radius (float)Radius.

CircleF

#
public CircleF(PointF centre, float radius)
Create a new Circle.
centre (PointF)Centre point.
radius (float)Radius.

Properties

Area

#
public float Area { get; }
Gets the area of this circle. If the radius is negative, so will the area be.

Bounds

#
public RectangleF Bounds { get; }
Gets the bounds of this circle.

Centre

#
public PointF Centre { get; set; }
Gets or sets the centre point of the circle.

Circumference

#
public float Circumference { get; }
Gets the circumference of this circle. Circles with negative radii will have negative circumferences.

Empty

#
public static CircleF Empty { get; }
Returns an empty circle.

Equation

#
public CircleEquation Equation { get; }
Gets the equation for the current circle.

IsEmpty

#
public bool IsEmpty { get; }
Gets whether this circle is empty, ie. has a radius of exactly zero.

IsUnset

#
public bool IsUnset { get; }
Gets whether this circle is unset, ie. whether any of its values are NaNs.

Radius

#
public float Radius { get; set; }
Gets or sets the radius of the circle.

Unset

#
public static CircleF Unset { get; }
Returns an unset circle.

Methods

CircumscribedCircle

#
public static CircleF CircumscribedCircle(RectangleF rectangle)
Gets the smallest circle which entirely contains the rectangle.
rectangle (RectangleF)Rectangle to contain.
Circle.

ClosestPointOnDisc

#
[Pure] public PointF ClosestPointOnDisc(PointF point)
Gets the point on the circle disc closest to a locus point.
point (PointF)Locus point.
Point on circle disc.

ClosestPointOnEdge

#
[Pure] public PointF ClosestPointOnEdge(PointF point)
Gets the point on the circle boundary closest to a locus point.
point (PointF)Locus point.
Point on circle edge.

CompareTo

#
public int CompareTo(CircleF other)
Compare this circle to another.
other (CircleF)Circle to compare to.
Sort order.

Contains

#
[Pure] public bool Contains(PointF point)
Test whether this circle contains a point.
point (PointF)Point to test.
True if the point is on or in this circle.

DistanceToDisc

#
[Pure] public float DistanceToDisc(PointF point)
Gets the distance from a point to the boundary of the circle.
point (PointF)Point to measure.
Distance from circle edge to point.

DistanceToEdge

#
[Pure] public float DistanceToEdge(PointF point)
Gets the distance from a point to the boundary of the circle.
point (PointF)Point to measure.
Distance from circle edge to point.

Divide

#
[Pure] public PointF[] Divide(double deviation)
Divide the circle into segments.
deviation (double)Maximum deviation between circle and polygon.
Array of points. The first and last point are coincident.

Equals

#
public bool Equals(CircleF other)
Compare one circle to another.
other (CircleF)Circle to compare to.
True if circles are equals.

InscribedCircle

#
public static CircleF InscribedCircle(RectangleF rectangle)
Gets the biggest circle which exists entirely within the rectangle.
rectangle (RectangleF)Rectangle to fit into.
Circle.

Offset

#
[Pure] public CircleF Offset(float amount)
Modify a circle by offsetting it.
amount (float)Amount to offset.
Offsetted circle.

PointAt

#
[Pure] public PointF PointAt(float angle)
Gets the point on the circle at the given angle.
angle (float)Angle in degrees, clockwise starting from positive x.
Point on circle.

PointIn

#
[Pure] public PointF PointIn(float angle, float radius)
Gets the point on the circle space at the given angle and offset.
angle (float)Angle in degrees, clockwise starting from positive x.
radius (float)Distance from circle centre in multiples of the radius.
Point in circular space.

Relation

#
public static ShapeRelation Relation(CircleF a, CircleF b)
Solve the geometric relationship between two circles.
a (CircleF)First circle.
b (CircleF)Second circle.
Relationship.

Relation

#
public static ShapeRelation Relation(CircleF a, RectangleF b)
Solve the geometric relationship between a circle and a rectangle.
a (CircleF)Circle.
b (RectangleF)Rectangle.
Relationship.

ThroughPoints

#
public static CircleF ThroughPoints(PointF p0, PointF p1, PointF p2)
Fit a circle through three points.
p0 (PointF)First point.
p1 (PointF)Second point.
p2 (PointF)Third point.
Fitted circle.

ThroughPoints

#
public static CircleF ThroughPoints(PointF p0, PointF p1)
Fit a circle through two points.
p0 (PointF)First point.
p1 (PointF)Second point.
Fitted circle.

ToString

#
public override string ToString()
Gets a string representation of this circle.
Description.

Convertors

OperationResultDescription
implicitCircleFCircleDefines widening conversion from Eto.Circle to Rhino.Geometry.Circle.
implicitCircleCircleFDefines widening conversion from Rhino.Geometry.Circle to Eto.Circle.
implicitCircleFRectangleFDefines widening conversion to Bounding rectangle.