Show / Hide Table of Contents

Class MLine

Represents a multiline EntityObject.

Inheritance
System.Object
DxfObject
EntityObject
MLine
Implements
IHasXData
System.ICloneable
Inherited Members
EntityObject.LayerChanged
EntityObject.OnLayerChangedEvent(Layer, Layer)
EntityObject.LinetypeChanged
EntityObject.OnLinetypeChangedEvent(Linetype, Linetype)
EntityObject.XDataAddAppReg
EntityObject.OnXDataAddAppRegEvent(ApplicationRegistry)
EntityObject.XDataRemoveAppReg
EntityObject.OnXDataRemoveAppRegEvent(ApplicationRegistry)
EntityObject.Reactors
EntityObject.Type
EntityObject.Color
EntityObject.Layer
EntityObject.Linetype
EntityObject.Lineweight
EntityObject.Transparency
EntityObject.LinetypeScale
EntityObject.IsVisible
EntityObject.Normal
EntityObject.Owner
EntityObject.XData
EntityObject.TransformBy(Matrix4)
EntityObject.ToString()
DxfObject.CodeName
DxfObject.Handle
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 MLine : EntityObject, IHasXData, ICloneable

Constructors

| Improve this Doc View Source

MLine()

Initializes a new instance of the MLine class.

Declaration
public MLine()
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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).

| Improve this Doc View Source

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).

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Elevation

Gets or sets the multiline elevation.

Declaration
public double Elevation { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

IsClosed

Gets or sets if the multiline is closed.

Declaration
public bool IsClosed { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Justification

Gets or sets the multiline justification.

Declaration
public MLineJustification Justification { get; set; }
Property Value
Type Description
MLineJustification
| Improve this Doc View Source

NoEndCaps

Gets or sets the suppression of end caps.

Declaration
public bool NoEndCaps { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

NoStartCaps

Gets or sets the suppression of start caps.

Declaration
public bool NoStartCaps { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Scale

Gets or sets the multiline scale.

Declaration
public double Scale { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Style

Gets or set the multiline style.

Declaration
public MLineStyle Style { get; set; }
Property Value
Type Description
MLineStyle
| Improve this Doc View Source

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 Source

Clone()

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
EntityObject.Clone()
| Improve this Doc View Source

Explode()

Decompose the actual multiline in its internal entities, Line and Arc.

Declaration
public List<EntityObject> Explode()
Returns
Type Description
System.Collections.Generic.List<EntityObject>

A list of Line and Arc that made up the multiline.

| Improve this Doc View Source

OnMLineStyleChangedEvent(MLineStyle, MLineStyle)

Declaration
protected virtual MLineStyle OnMLineStyleChangedEvent(MLineStyle oldMLineStyle, MLineStyle newMLineStyle)
Parameters
Type Name Description
MLineStyle oldMLineStyle
MLineStyle newMLineStyle
Returns
Type Description
MLineStyle
| Improve this Doc View Source

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
EntityObject.TransformBy(Matrix3, Vector3)
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.

| Improve this Doc View Source

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 Source

MLineStyleChanged

Declaration
public event MLine.MLineStyleChangedEventHandler MLineStyleChanged
Event Type
Type Description
MLine.MLineStyleChangedEventHandler

Implements

IHasXData
System.ICloneable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX