Class vdLayer
- Namespace
- VectorDraw.Professional.vdPrimaries
- Assembly
- VectorDraw.Professional.dll
Represents a drawing layer in a VectorDraw document.
public sealed class vdLayer : vdPrimary, IDisposable, IVDSerialise, IBaseObject, IComparable
- Inheritance
-
vdLayer
- Implements
- Inherited Members
Examples
Example: Add a new layer and a new line that referencing this layer
vdLayer layer = document.Layers.Add("MyLayer");
layer.PenColor = new vdColor(Color.Red);
vdLine line = new vdLine(document, new gPoint(0, 0, 0), new gPoint(10, 10, 0));
line.Layer = layer;
document.Model.Entities.AddItem(line);
document.Redraw(false);
Remarks
A vdLayer encapsulates properties that control rendering and printing behavior
for figures that belong to the layer (for example: PenColor, LineType,
LineWeight, Frozen, Lock, On and Plot).
Layers are stored in a vdLayers table associated with a vdDocument
Constructors
- vdLayer()
Initializes the vdLayer object.
- vdLayer(vdDocument)
Initializes the vdLayer object and registers it to the passed Document.
- vdLayer(vdDocument, string)
Initializes the vdLayer object and registers it to the passed Document.
- vdLayer(vdDocument, string, vdColor)
Initializes the vdLayer object and registers it to the passed Document.
Properties
- Deleted
Get/Set a property that marks the object as Deleted or not.
- Description
Get/Set the description of the layer.
- Frozen
Get/Set a boolean value representing if a layer is frozen or not.
- IsUsed
Returns true if this layer object is equals to Standard -or- equals to ActiveLayer -or- GetReferenceObjects() returns a non empty array
- LineType
Get/Set the Linetype of the Layer.
- LineWeight
Get/Set the line weight of the layer.
- Lock
Get/Set a boolean value representing if the layer is frozen or not.
- Name
Get/Set the name of the layer.
- On
Get/Set a boolean value representing if a layer is On or Off.
- PenColor
Get/Set the pencolor of the layer.
- Plot
Get/Set a boolean value representing if the layer will be printed or not.
- VisibleOnForms
Get/Set a boolean value representing if the vdLayer will be viewed in Vectordraw forms.
Methods
- CompareTo(object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdLayer object when opening in vdml format.
- GetReferenceObjects()
Returns a copy of the collection that contains all entities reference this object.
- GetReferenceObjects(vdLayout)
Returns a copy of the collection that contains all entities reference this object and owns to a specific vdLayout.
- GetTableDependecies(vdTableDependeciesArgs)
Fills the passed vdTableDependeciesArgs args with all the table references of this object (vdLayer, vdBlock, vdDimstyle, vdLineType, vdTextstyle, vdImageDef, vdHatchPattern etc).
- InitializeProperties()
Resets the properties of the vdLayer object to the Default values.
- InternalSetOwner(vdBaseObject)
Internally used only.
Set the object owner
- Invalidate()
Call the Invalidate() method for each object that reference the Layer.
- MatchProperties(vdPrimary, vdDocument)
Matches all the common properties from an object and sets them to this object.
- Serialize(Serializer)
This Function is called when saving the vdLayer object to vdml format.
- ToString()
Gets a System.String that represents the name of the vdLayer Object.