Class MLineStyleElement
Represent each of the elements that make up a MLineStyle.
Inheritance
Inherited Members
Namespace: netDxf.Objects
Assembly: CADability.dll
Syntax
public class MLineStyleElement : IComparable<MLineStyleElement>, ICloneable
Constructors
| Improve this Doc View SourceMLineStyleElement(Double)
Initializes a new instance of the MLineStyleElement class.
Declaration
public MLineStyleElement(double offset)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | offset | Element offset. |
MLineStyleElement(Double, AciColor, Linetype)
Initializes a new instance of the MLineStyleElement class.
Declaration
public MLineStyleElement(double offset, AciColor color, Linetype linetype)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | offset | Element offset. |
| AciColor | color | Element color. |
| Linetype | linetype | Element line type. |
Properties
| Improve this Doc View SourceColor
Gets or sets the element color.
Declaration
public AciColor Color { get; set; }
Property Value
| Type | Description |
|---|---|
| AciColor |
Remarks
AutoCad2000 DXF version does not support true colors for MLineStyleElement color.
Linetype
Gets or sets the element line type.
Declaration
public Linetype Linetype { get; set; }
Property Value
| Type | Description |
|---|---|
| Linetype |
Offset
Gets or sets the element offset.
Declaration
public double Offset { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Methods
| Improve this Doc View SourceClone()
Creates a MLineStyleElement that is a copy of the current instance.
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new MLineStyleElement is a copy of this instance. |
CompareTo(MLineStyleElement)
Compares the current object with another object of the same type.
Declaration
public int CompareTo(MLineStyleElement other)
Parameters
| Type | Name | Description |
|---|---|---|
| MLineStyleElement | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The MLineStyleElements are ordered from larger to smaller offset values. A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter. Zero This object is equal to other. Greater than zero This object is greater than other. |
Equals(MLineStyleElement)
Check if two MLineStyleElement are equal.
Declaration
public bool Equals(MLineStyleElement other)
Parameters
| Type | Name | Description |
|---|---|---|
| MLineStyleElement | other | Another MLineStyleElement to compare to. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if two MLineStyleElement are equal or false in any other case. |
Remarks
Two MLineStyleElement are considered equals if their offsets are the same.
Equals(Object)
Check if two MLineStyleElement are equal.
Declaration
public override bool Equals(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | other | Another MLineStyleElement to compare to. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if two MLineStyleElement are equal or false in any other case. |
Overrides
Remarks
Two MLineStyleElement are considered equals if their offsets are the same.
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A 32-bit signed integer that is the hash code for this instance. |
Overrides
OnLinetypeChangedEvent(Linetype, Linetype)
Declaration
protected virtual Linetype OnLinetypeChangedEvent(Linetype oldLinetype, Linetype newLinetype)
Parameters
| Type | Name | Description |
|---|---|---|
| Linetype | oldLinetype | |
| Linetype | newLinetype |
Returns
| Type | Description |
|---|---|
| Linetype |
ToString()
Converts the value of this instance to its equivalent string representation.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | The string representation. |
Overrides
Events
| Improve this Doc View SourceLinetypeChanged
Declaration
public event MLineStyleElement.LinetypeChangedEventHandler LinetypeChanged
Event Type
| Type | Description |
|---|---|
| MLineStyleElement.LinetypeChangedEventHandler |