Class MLine
Represents a multiline EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class MLine : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceMLine()
Initializes a new instance of the MLine class.
Declaration
public MLine()
MLine(IEnumerable<Vector2>)
Initializes a new instance of the MLine class.
Declaration
public MLine(IEnumerable<Vector2> vertexes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector2> | vertexes | Multiline Vector2 location list in object coordinates. |
MLine(IEnumerable<Vector2>, MLineStyle, Double)
Initializes a new instance of the MLine class.
Declaration
public MLine(IEnumerable<Vector2> vertexes, MLineStyle style, double scale)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector2> | vertexes | MLine Vector2 location list in object coordinates. |
| MLineStyle | style | MLine MLineStyle |
| System.Double | scale | MLine scale. |
MLine(IEnumerable<Vector2>, MLineStyle, Double, Boolean)
Initializes a new instance of the MLine class.
Declaration
public MLine(IEnumerable<Vector2> vertexes, MLineStyle style, double scale, bool isClosed)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector2> | vertexes | MLine Vector2 location list in object coordinates. |
| MLineStyle | style | MLine MLineStyle |
| System.Double | scale | MLine scale. |
| System.Boolean | isClosed | Sets if the multiline is closed (default: false). |
MLine(IEnumerable<Vector2>, Boolean)
Initializes a new instance of the MLine class.
Declaration
public MLine(IEnumerable<Vector2> vertexes, bool isClosed)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector2> | vertexes | Multiline Vector2 location list in object coordinates. |
| System.Boolean | isClosed | Sets if the multiline is closed (default: false). |
MLine(IEnumerable<Vector2>, Double)
Initializes a new instance of the MLine class.
Declaration
public MLine(IEnumerable<Vector2> vertexes, double scale)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector2> | vertexes | Multiline Vector2 location list in object coordinates. |
| System.Double | scale | Multiline scale. |
MLine(IEnumerable<Vector2>, Double, Boolean)
Initializes a new instance of the MLine class.
Declaration
public MLine(IEnumerable<Vector2> vertexes, double scale, bool isClosed)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector2> | vertexes | Multiline Vector2 location list in object coordinates. |
| System.Double | scale | Multiline scale. |
| System.Boolean | isClosed | Sets if the multiline is closed (default: false). |
Properties
| Improve this Doc View SourceElevation
Gets or sets the multiline elevation.
Declaration
public double Elevation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
IsClosed
Gets or sets if the multiline is closed.
Declaration
public bool IsClosed { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Justification
Gets or sets the multiline justification.
Declaration
public MLineJustification Justification { get; set; }
Property Value
| Type | Description |
|---|---|
| MLineJustification |
NoEndCaps
Gets or sets the suppression of end caps.
Declaration
public bool NoEndCaps { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
NoStartCaps
Gets or sets the suppression of start caps.
Declaration
public bool NoStartCaps { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Scale
Gets or sets the multiline scale.
Declaration
public double Scale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Style
Gets or set the multiline style.
Declaration
public MLineStyle Style { get; set; }
Property Value
| Type | Description |
|---|---|
| MLineStyle |
Vertexes
Gets the multiline MLineVertex list.
Declaration
public List<MLineVertex> Vertexes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<MLineVertex> |
Methods
| Improve this Doc View SourceClone()
Creates a new MLine that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new MLine that is a copy of this instance. |
Overrides
| Improve this Doc View SourceExplode()
Declaration
public List<EntityObject> Explode()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<EntityObject> |
OnMLineStyleChangedEvent(MLineStyle, MLineStyle)
Declaration
protected virtual MLineStyle OnMLineStyleChangedEvent(MLineStyle oldMLineStyle, MLineStyle newMLineStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| MLineStyle | oldMLineStyle | |
| MLineStyle | newMLineStyle |
Returns
| Type | Description |
|---|---|
| MLineStyle |
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 for multilines.
Explode the entity and, in case round end caps has been applied, convert the arcs into ellipse arcs and transform them instead.
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.
Update()
Calculates the internal information of the multiline vertexes.
Declaration
public void Update()
Remarks
This function needs to be called manually when any modification is done that affects the final shape of the multiline.
If the vertex distance list needs to be edited to represent trimmed multilines this function needs to be called prior to any modification. It will calculate the minimum information needed to build a correct multiline.
Events
| Improve this Doc View SourceMLineStyleChanged
Declaration
public event MLine.MLineStyleChangedEventHandler MLineStyleChanged
Event Type
| Type | Description |
|---|---|
| MLine.MLineStyleChangedEventHandler |