DXFReaderNETControlAddEllipse Method
|
Adds a new ellipse or elliptic arc to the current drawing.
Namespace:
DXFReaderNET
Assembly:
DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax public EntityObject AddEllipse(
Vector3 Center,
double MajorAxis,
double MinorAxis,
double Rotation = 0,
double StartAngle = 0,
double EndAngle = 6,28318530717959,
short ACIColor = 256,
string LayerName = "",
string LineTypeName = ""
)
Public Function AddEllipse (
Center As Vector3,
MajorAxis As Double,
MinorAxis As Double,
Optional Rotation As Double = 0,
Optional StartAngle As Double = 0,
Optional EndAngle As Double = 6,28318530717959,
Optional ACIColor As Short = 256,
Optional LayerName As String = "",
Optional LineTypeName As String = ""
) As EntityObject
public:
EntityObject^ AddEllipse(
Vector3 Center,
double MajorAxis,
double MinorAxis,
double Rotation = 0,
double StartAngle = 0,
double EndAngle = 6,28318530717959,
short ACIColor = 256,
String^ LayerName = L"",
String^ LineTypeName = L""
)
member AddEllipse :
Center : Vector3 *
MajorAxis : float *
MinorAxis : float *
?Rotation : float *
?StartAngle : float *
?EndAngle : float *
?ACIColor : int16 *
?LayerName : string *
?LineTypeName : string
(* Defaults:
let _Rotation = defaultArg Rotation 0
let _StartAngle = defaultArg StartAngle 0
let _EndAngle = defaultArg EndAngle 6,28318530717959
let _ACIColor = defaultArg ACIColor 256
let _LayerName = defaultArg LayerName ""
let _LineTypeName = defaultArg LineTypeName ""
*)
-> EntityObject
METHOD AddEllipse(
Center AS Vector3,
MajorAxis AS REAL8,
MinorAxis AS REAL8,
Rotation AS REAL8 := 0,
StartAngle AS REAL8 := 0,
EndAngle AS REAL8 := 6,28318530717959,
ACIColor AS SHORT := 256,
LayerName AS STRING := "",
LineTypeName AS STRING := ""
) AS EntityObject
Parameters
- Center
- Type: DXFReaderNETVector3
The center of the ellipse. - MajorAxis
- Type: SystemDouble
The major axis of the ellipse in drawing's units. - MinorAxis
- Type: SystemDouble
The minor axis of the ellipse in drawing's units. - Rotation (Optional)
- Type: SystemDouble
The ellipse rotation in degrees (Default value = 0). - StartAngle (Optional)
- Type: SystemDouble
The start angle in radians of the elliptic arc. - EndAngle (Optional)
- Type: SystemDouble
The end angle in radians of the elliptic arc. - ACIColor (Optional)
- Type: SystemInt16
A number for 0 to 256 corresponding to the AutoCAD Color Index (0 = ByBlock; 256 = ByLayer. Default value = 256). - LayerName (Optional)
- Type: SystemString
The layer name. If omitted, or layername doesn't exist, the CurrentLayer will be used. - LineTypeName (Optional)
- Type: SystemString
The linetype name. If omitted, or linetype doesn't exist, the CurrentLineTypeName will be used.
Return Value
Type:
EntityObjectThe new added
Ellipse.
Remarks The entity is added to the active layout. To add a full ellipse StartAngle = 0 and EndAngle = 2π.
Examples
Adds a new ellipse entity to the current drawing with center in (100, 100), major axis = 100, minor axis =50, rotation 34° with ACI color = 1 (red).
[C#]
Vector3 Center = new Vector3(100, 100, 0);
double MajorAxis = 100;
double MinorAxis = 50;
double Rotation = 34;
dxfReaderNETControl1.AddEllipse(Center, MajorAxis, MinorAxis, Rotation, 0, MathHelper.TwoPI, 1);
[Visual Basic]
Dim Center As New Vector3(100, 100, 0)
Dim MajorAxis As Double = 100
Dim MinorAxis As Double = 50
Dim Rotation As Double = 34
DxfReaderNETControl1.AddEllipse(Center, MajorAxis, MinorAxis, Rotation, 0, MathHelper.TwoPI, 1)
See Also