Class ShapeStyle
Represent a shape style.
Implements
Inherited Members
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class ShapeStyle : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>
Constructors
| Improve this Doc View SourceShapeStyle(String)
Initializes a new instance of the ShapeStyle class.
Declaration
public ShapeStyle(string file)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | file | Shape definitions SHX file. |
ShapeStyle(String, String)
Initializes a new instance of the ShapeStyle class.
Declaration
public ShapeStyle(string name, string file)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Shape style name. |
| System.String | file | Shape definitions SHX file. |
Properties
| Improve this Doc View SourceDefault
Gets the default shape style
Declaration
public static ShapeStyle Default { get; }
Property Value
| Type | Description |
|---|---|
| ShapeStyle |
Remarks
AutoCad stores the shapes for the predefined complex linetypes in the ltypeshp.shx file.
File
Gets the shape SHX file name.
Declaration
public string File { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ObliqueAngle
Gets the shape oblique angle in degrees.
Declaration
public double ObliqueAngle { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
This value seems to have no effect on shapes or complex line types with shapes. Default: 0.0.
Owner
Gets the owner of the actual shape style.
Declaration
public ShapeStyles Owner { get; }
Property Value
| Type | Description |
|---|---|
| ShapeStyles |
Size
Gets the shape size.
Declaration
public double Size { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
This value seems to have no effect on shapes or complex line types with shapes. Default: 0.0.
WidthFactor
Gets the shape width factor.
Declaration
public double WidthFactor { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
This value seems to have no effect on shapes or complex line types with shapes. Default: 1.0.
Methods
| Improve this Doc View SourceClone()
Creates a new TextStyle that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new TextStyle that is a copy of this instance. |
Overrides
| Improve this Doc View SourceClone(String)
Creates a new TextStyle that is a copy of the current instance.
Declaration
public override TableObject Clone(string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newName | TextStyle name of the copy. |
Returns
| Type | Description |
|---|---|
| TableObject | A new TextStyle that is a copy of this instance. |
Overrides
| Improve this Doc View SourceContainsShapeName(String)
Checks if the actual shape style contains a shape with the specified name.
Declaration
public bool ContainsShapeName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Shape name. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the shape style that contains a shape with the specified name, false otherwise. |
Remarks
If the actual shape style belongs to a document, it will look for the SHP file also in the document support folders.
ShapeName(Int16)
Gets the name of the shape with the specified number.
Declaration
public string ShapeName(short number)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int16 | number | Number of the shape. |
Returns
| Type | Description |
|---|---|
| System.String | The name of the shape, empty in case the shape has not been found. |
Remarks
If the actual shape style belongs to a document, it will look for the SHP file also in the document support folders.
ShapeNumber(String)
Gets the number of the shape with the specified name.
Declaration
public short ShapeNumber(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the shape. |
Returns
| Type | Description |
|---|---|
| System.Int16 | The number of the shape, 0 in case the shape has not been found. |
Remarks
If the actual shape style belongs to a document, it will look for the SHP file also in the document support folders.