Class Line
Represents a line EntityObject.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Line : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceLine()
Initializes a new instance of the Line class.
Declaration
public Line()
Line(Vector2, Vector2)
Initializes a new instance of the Line class.
Declaration
public Line(Vector2 startPoint, Vector2 endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | startPoint | Line Vector2 |
| Vector2 | endPoint | Line Vector2 |
Line(Vector3, Vector3)
Initializes a new instance of the Line class.
Declaration
public Line(Vector3 startPoint, Vector3 endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | startPoint | Line start Vector3 |
| Vector3 | endPoint | Line end Vector3 |
Properties
| Improve this Doc View SourceDirection
Gets the direction of the line.
Declaration
public Vector3 Direction { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
EndPoint
Gets or sets the line Vector3.
Declaration
public Vector3 EndPoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
StartPoint
Gets or sets the line Vector3.
Declaration
public Vector3 StartPoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Thickness
Gets or sets the line thickness.
Declaration
public double Thickness { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Methods
| Improve this Doc View SourceClone()
Creates a new Line that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Line that is a copy of this instance. |
Overrides
| Improve this Doc View SourceReverse()
Switch the line direction.
Declaration
public void Reverse()
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
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.
Implements
System.ICloneable