Class LinetypeTextSegment
Represents a text linetype segment.
Implements
Inherited Members
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class LinetypeTextSegment : LinetypeSegment, ICloneable
Constructors
| Improve this Doc View SourceLinetypeTextSegment()
Initializes a new instance of the LinetypeShapeSegment class.
Declaration
public LinetypeTextSegment()
LinetypeTextSegment(String, TextStyle, Double)
Initializes a new instance of the LinetypeShapeSegment class.
Declaration
public LinetypeTextSegment(string text, TextStyle style, double length)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | Text to display on the linetype segment. |
| TextStyle | style | Name of the TextStyle. |
| System.Double | length | Dash, dot, or space length of the linetype segment. |
LinetypeTextSegment(String, TextStyle, Double, Vector2, LinetypeSegmentRotationType, Double, Double)
Initializes a new instance of the LinetypeShapeSegment class.
Declaration
public LinetypeTextSegment(string text, TextStyle style, double length, Vector2 offset, LinetypeSegmentRotationType rotationType, double rotation, double scale)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | Text to display on the linetype segment. |
| TextStyle | style | Name of the TextStyle. |
| System.Double | length | Dash, dot, or space length of the linetype segment. |
| Vector2 | offset | Shift of the shape along the line. |
| LinetypeSegmentRotationType | rotationType | Type of rotation defined by the rotation value. |
| System.Double | rotation | Rotation of the text. |
| System.Double | scale | Scale of the text. |
Properties
| Improve this Doc View SourceOffset
Gets or sets the shift of the text along the line.
Declaration
public Vector2 Offset { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Rotation
Gets or sets the angle in degrees of the text.
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
RotationType
Gets or sets the type of rotation defined by the rotation value upright, relative, or absolute.
Declaration
public LinetypeSegmentRotationType RotationType { get; set; }
Property Value
| Type | Description |
|---|---|
| LinetypeSegmentRotationType |
Scale
Gets or sets the scale of the text relative to the scale of the linetype.
Declaration
public double Scale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Style
Gets or sets the TextStyle of the text to be displayed by the linetype.
Declaration
public TextStyle Style { get; set; }
Property Value
| Type | Description |
|---|---|
| TextStyle |
Text
Gets or sets the text displayed by the linetype.
Declaration
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceClone()
Creates a new LinetypeShapeSegment that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new |
Overrides
| Improve this Doc View SourceOnTextStyleChangedEvent(TextStyle, TextStyle)
Declaration
protected virtual TextStyle OnTextStyleChangedEvent(TextStyle oldTextStyle, TextStyle newTextStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| TextStyle | oldTextStyle | |
| TextStyle | newTextStyle |
Returns
| Type | Description |
|---|---|
| TextStyle |
Events
| Improve this Doc View SourceTextStyleChanged
Declaration
public event LinetypeTextSegment.TextStyleChangedEventHandler TextStyleChanged
Event Type
| Type | Description |
|---|---|
| LinetypeTextSegment.TextStyleChangedEventHandler |