Class MLineStyle
Represents as MLine style.
Implements
Inherited Members
Namespace: netDxf.Objects
Assembly: CADability.dll
Syntax
public class MLineStyle : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>
Constructors
| Improve this Doc View SourceMLineStyle(String)
Initializes a new instance of the MLineStyle class.
Declaration
public MLineStyle(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | MLine style name. |
Remarks
By default the multiline style has to elements with offsets 0.5 y -0.5.
MLineStyle(String, IEnumerable<MLineStyleElement>)
Initializes a new instance of the MLineStyle class.
Declaration
public MLineStyle(string name, IEnumerable<MLineStyleElement> elements)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | MLine style name. |
| System.Collections.Generic.IEnumerable<MLineStyleElement> | elements | Elements of the multiline, if null two default elements will be added. |
MLineStyle(String, IEnumerable<MLineStyleElement>, String)
Initializes a new instance of the MLineStyle class.
Declaration
public MLineStyle(string name, IEnumerable<MLineStyleElement> elements, string description)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | MLine style name. |
| System.Collections.Generic.IEnumerable<MLineStyleElement> | elements | Elements of the multiline, if null two default elements will be added. |
| System.String | description | MLine style description (optional). |
MLineStyle(String, String)
Initializes a new instance of the MLineStyle class.
Declaration
public MLineStyle(string name, string description)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | MLine style name. |
| System.String | description | MLine style description. |
Remarks
By default the multiline style has to elements with offsets 0.5 y -0.5.
Fields
| Improve this Doc View SourceDefaultName
Default multiline style name.
Declaration
public const string DefaultName = "Standard"
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
| Improve this Doc View SourceDefault
Gets the default MLine style.
Declaration
public static MLineStyle Default { get; }
Property Value
| Type | Description |
|---|---|
| MLineStyle |
Description
Gets or sets the line type description (optional).
Declaration
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Elements
Gets the list of elements that make up the multiline.
Declaration
public ObservableCollection<MLineStyleElement> Elements { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<MLineStyleElement> |
Remarks
The elements list must be ordered from larger to smaller Offset values. During the initialization process the list will be sorted automatically, but if new elements are added individually to the list or the offset values of individual elements are modified, it will have to be sorted manually calling the Sort() method.
EndAngle
Gets or sets the MLine end angle in degrees.
Declaration
public double EndAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
Valid values range from 10.0 to 170.0 degrees. Default: 90.0.
FillColor
Gets or sets the MLine fill color.
Declaration
public AciColor FillColor { get; set; }
Property Value
| Type | Description |
|---|---|
| AciColor |
Remarks
AutoCad2000 DXF version does not support true colors for MLineStyle fill color.
Flags
Gets or sets the MLine style flags.
Declaration
public MLineStyleFlags Flags { get; set; }
Property Value
| Type | Description |
|---|---|
| MLineStyleFlags |
Owner
Gets the owner of the actual multi line style.
Declaration
public MLineStyles Owner { get; }
Property Value
| Type | Description |
|---|---|
| MLineStyles |
StartAngle
Gets or sets the MLine start angle in degrees.
Declaration
public double StartAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
Valid values range from 10.0 to 170.0 degrees. Default: 90.0.
Methods
| Improve this Doc View SourceClone()
Creates a new MLineStyle that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new MLineStyle that is a copy of this instance. |
Overrides
| Improve this Doc View SourceClone(String)
Creates a new MLineStyle that is a copy of the current instance.
Declaration
public override TableObject Clone(string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newName | MLineStyle name of the copy. |
Returns
| Type | Description |
|---|---|
| TableObject | A new MLineStyle that is a copy of this instance. |
Overrides
| Improve this Doc View SourceOnMLineStyleElementAddedEvent(MLineStyleElement)
Declaration
protected virtual void OnMLineStyleElementAddedEvent(MLineStyleElement item)
Parameters
| Type | Name | Description |
|---|---|---|
| MLineStyleElement | item |
OnMLineStyleElementLinetypeChangedEvent(Linetype, Linetype)
Declaration
protected virtual Linetype OnMLineStyleElementLinetypeChangedEvent(Linetype oldLinetype, Linetype newLinetype)
Parameters
| Type | Name | Description |
|---|---|---|
| Linetype | oldLinetype | |
| Linetype | newLinetype |
Returns
| Type | Description |
|---|---|
| Linetype |
OnMLineStyleElementRemovedEvent(MLineStyleElement)
Declaration
protected virtual void OnMLineStyleElementRemovedEvent(MLineStyleElement item)
Parameters
| Type | Name | Description |
|---|---|---|
| MLineStyleElement | item |
Events
| Improve this Doc View SourceMLineStyleElementAdded
Declaration
public event MLineStyle.MLineStyleElementAddedEventHandler MLineStyleElementAdded
Event Type
| Type | Description |
|---|---|
| MLineStyle.MLineStyleElementAddedEventHandler |
MLineStyleElementLinetypeChanged
Declaration
public event MLineStyle.MLineStyleElementLinetypeChangedEventHandler MLineStyleElementLinetypeChanged
Event Type
| Type | Description |
|---|---|
| MLineStyle.MLineStyleElementLinetypeChangedEventHandler |
MLineStyleElementRemoved
Declaration
public event MLineStyle.MLineStyleElementRemovedEventHandler MLineStyleElementRemoved
Event Type
| Type | Description |
|---|---|
| MLineStyle.MLineStyleElementRemovedEventHandler |