Show / Hide Table of Contents

Class Shape

Represents a shape entity.

Inheritance
System.Object
DxfObject
EntityObject
Shape
Implements
IHasXData
System.ICloneable
Inherited Members
EntityObject.LayerChanged
EntityObject.OnLayerChangedEvent(Layer, Layer)
EntityObject.LinetypeChanged
EntityObject.OnLinetypeChangedEvent(Linetype, Linetype)
EntityObject.XDataAddAppReg
EntityObject.OnXDataAddAppRegEvent(ApplicationRegistry)
EntityObject.XDataRemoveAppReg
EntityObject.OnXDataRemoveAppRegEvent(ApplicationRegistry)
EntityObject.Reactors
EntityObject.Type
EntityObject.Color
EntityObject.Layer
EntityObject.Linetype
EntityObject.Lineweight
EntityObject.Transparency
EntityObject.LinetypeScale
EntityObject.IsVisible
EntityObject.Normal
EntityObject.Owner
EntityObject.XData
EntityObject.TransformBy(Matrix4)
EntityObject.ToString()
DxfObject.CodeName
DxfObject.Handle
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)
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Shape : EntityObject, IHasXData, ICloneable

Constructors

| Improve this Doc View Source

Shape(String, ShapeStyle)

Initializes a new instance of the Shape class.

Declaration
public Shape(string name, ShapeStyle style)
Parameters
Type Name Description
System.String name

Name of the shape which geometry is defined in the shape ShapeStyle.

ShapeStyle style

Shape TextStyle.

| Improve this Doc View Source

Shape(String, ShapeStyle, Vector3, Double, Double)

Initializes a new instance of the Shape class.

Declaration
public Shape(string name, ShapeStyle style, Vector3 position, double size, double rotation)
Parameters
Type Name Description
System.String name

Name of the shape which geometry is defined in the shape ShapeStyle.

ShapeStyle style

Shape TextStyle.

Vector3 position

Shape insertion point.

System.Double size

Shape size.

System.Double rotation

Shape rotation.

Properties

| Improve this Doc View Source

Name

Gets the shape name.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ObliqueAngle

Gets or sets the shape oblique angle in degrees.

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

Position

Gets or sets the shape Vector3 in world coordinates.

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

Rotation

Gets or sets the shape rotation in degrees.

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

Size

Gets or sets the size of the shape.

Declaration
public double Size { get; set; }
Property Value
Type Description
System.Double
Remarks

The shape size is relative to the actual size of the shape definition. The size value works as an scale value applied to the dimensions of the shape definition. The DXF allows for negative values but that is the same as rotating the shape 180 degrees.
Size values must be greater than zero. Default: 1.0.

| Improve this Doc View Source

Style

Gets the ShapeStyle.

Declaration
public ShapeStyle Style { get; }
Property Value
Type Description
ShapeStyle
| Improve this Doc View Source

Thickness

Gets or set the shape thickness.

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

WidthFactor

Gets or sets the shape width factor.

Declaration
public double WidthFactor { get; set; }
Property Value
Type Description
System.Double
Remarks

Width factor values cannot be zero. Default: 1.0.

Methods

| Improve this Doc View Source

Clone()

Declaration
public override object Clone()
Returns
Type Description
System.Object
Overrides
EntityObject.Clone()
| Improve this Doc View Source

TransformBy(Matrix3, Vector3)

Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.

Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
Type Name Description
Matrix3 transformation

Transformation matrix.

Vector3 translation

Translation vector.

Overrides
EntityObject.TransformBy(Matrix3, Vector3)
Remarks

Matrix3 adopts the convention of using column vectors to represent a transformation matrix.

Implements

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