Class LinetypeShapeSegment
Represents a shape linetype segment.
Implements
Inherited Members
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class LinetypeShapeSegment : LinetypeSegment, ICloneable
Constructors
| Improve this Doc View SourceLinetypeShapeSegment(String, ShapeStyle)
Initializes a new instance of the LinetypeShapeSegment class.
Declaration
public LinetypeShapeSegment(string name, ShapeStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Shape name of the linetype segment. |
| ShapeStyle | style | File where the shape of the linetype segment is defined. |
Remarks
The shape must be defined in the .shx shape definitions file.
The DXF instead of saving the shape name, as the Shape entity or the shape linetype segments definition in a .lin file,
it stores the shape number. Therefore when saving a DXF file the shape number will be obtained reading the .shp file.
It is required that the equivalent .shp file to be also present in the same folder or one of the support folders defined in the DxfDocument.
LinetypeShapeSegment(String, ShapeStyle, Double)
Initializes a new instance of the LinetypeShapeSegment class.
Declaration
public LinetypeShapeSegment(string name, ShapeStyle style, double length)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Shape name of the linetype segment. |
| ShapeStyle | style | File where the shape of the linetype segment is defined. |
| System.Double | length | Dash, dot, or space length of the linetype segment. |
Remarks
The shape must be defined in the .shx shape definitions file.
The DXF instead of saving the shape name, as the Shape entity or the shape linetype segments definition in a .lin file,
it stores the shape number. Therefore when saving a DXF file the shape number will be obtained reading the .shp file.
It is required that the equivalent .shp file to be also present in the same folder or one of the support folders defined in the DxfDocument.
LinetypeShapeSegment(String, ShapeStyle, Double, Vector2, LinetypeSegmentRotationType, Double, Double)
Initializes a new instance of the LinetypeShapeSegment class.
Declaration
public LinetypeShapeSegment(string name, ShapeStyle style, double length, Vector2 offset, LinetypeSegmentRotationType rotationType, double rotation, double scale)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Shape name of the linetype segment. |
| ShapeStyle | style | File where the shape of the linetype segment is defined. |
| 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 shape. |
| System.Double | scale | Scale of the shape. |
Remarks
The shape must be defined in the .shx shape definitions file.
The DXF instead of saving the shape name, as the Shape entity or the shape linetype segments definition in a .lin file,
it stores the shape number. Therefore when saving a DXF file the shape number will be obtained reading the .shp file.
It is required that the equivalent .shp file to be also present in the same folder or one of the support folders defined in the DxfDocument.
Properties
| Improve this Doc View SourceName
Gets the name of the shape.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The shape must be defined in the .shx shape definitions file.
The DXF instead of saving the shape name, as the Shape entity or the shape linetype segments definition in a .lin file,
it stores the shape number. Therefore when saving a DXF file the shape number will be obtained reading the .shp file.
Offset
Gets or sets the shift of the shape along the line.
Declaration
public Vector2 Offset { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Rotation
Gets or sets the angle in degrees of the shape.
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 shape relative to the scale of the line type.
Declaration
public double Scale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Style
Gets the shape style.
Declaration
public ShapeStyle Style { get; }
Property Value
| Type | Description |
|---|---|
| ShapeStyle |
Remarks
It is required that the equivalent .shp file to be also present in the same folder or one of the support folders defined in the DxfDocument.
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 |