Class Circle
Represents a circle EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Circle : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceCircle()
Initializes a new instance of the Circle class.
Declaration
public Circle()
Circle(Vector2, Double)
Initializes a new instance of the Circle class.
Declaration
public Circle(Vector2 center, double radius)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | center | Circle Vector2 in world coordinates. |
| System.Double | radius | Circle radius. |
Circle(Vector3, Double)
Initializes a new instance of the Circle class.
Declaration
public Circle(Vector3 center, double radius)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | center | Circle Vector3 in world coordinates. |
| System.Double | radius | Circle radius. |
Properties
| Improve this Doc View SourceCenter
Gets or sets the circle Vector3 in world coordinates.
Declaration
public Vector3 Center { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Radius
Gets or set the circle radius.
Declaration
public double Radius { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Thickness
Gets or sets the circle thickness.
Declaration
public double Thickness { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Methods
| Improve this Doc View SourceClone()
Creates a new Circle that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Circle that is a copy of this instance. |
Overrides
| Improve this Doc View SourcePolygonalVertexes(Int32)
Converts the circle in a list of vertexes.
Declaration
public List<Vector2> PolygonalVertexes(int precision)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | precision | Number of vertexes generated. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Vector2> | A list vertexes that represents the circle expressed in object coordinate system. |
ToPolyline(Int32)
Converts the circle in a Polyline.
Declaration
public LwPolyline ToPolyline(int precision)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | precision | Number of vertexes generated. |
Returns
| Type | Description |
|---|---|
| LwPolyline | A new instance of LwPolyline that represents the circle. |
TransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Non-uniform scaling is not supported, create an ellipse from the circle data and transform that instead.
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.