Show / Hide Table of Contents

Class LinetypeShapeSegment

Represents a shape linetype segment.

Inheritance
System.Object
LinetypeSegment
LinetypeShapeSegment
Implements
System.ICloneable
Inherited Members
LinetypeSegment.Type
LinetypeSegment.Length
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)
System.Object.ToString()
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class LinetypeShapeSegment : LinetypeSegment, ICloneable

Constructors

| Improve this Doc View Source

LinetypeShapeSegment(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Name

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.

| Improve this Doc View Source

Offset

Gets or sets the shift of the shape along the line.

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

Rotation

Gets or sets the angle in degrees of the shape.

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

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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 Source

Clone()

Creates a new LinetypeShapeSegment that is a copy of the current instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new LinetypeShapeSegment that is a copy of this instance.

Overrides
LinetypeSegment.Clone()

Implements

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