Class vdRect
- Namespace
- VectorDraw.Professional.vdFigures
- Assembly
- VectorDraw.Professional.dll
Represents a rectangular curve entity used by the VectorDraw framework.
public class vdRect : vdCurve, IDisposable, IVDSerialise, IvdHatchFigure, IBaseObject
- Inheritance
-
vdRect
- Implements
- Derived
- Inherited Members
Remarks
The vdRect class models a rectangular figure.
The rectangle geometry is described by:
- InsertionPoint — the lower-left corner in WCS.
- Width and Height — the rectangle's extents in drawing units.
- Rotation — the rotation about the Z-axis in radians applied to the ECS before translation.
Typical usage:
- Modify geometric properties and call Update() to recalculate dependent data (e.g., bounding box).
- Use AsPolyline() to obtain an editable closed polyline representation.
- Use HatchProperties to control fill rendering and hatch origin/scale/angle.
Constructors
- vdRect()
Initializes a new instance of the vdRect object.
- vdRect(vdDocument)
Initializes a new instance of the vdRect object and registers it to the passed Document.
- vdRect(vdDocument, gPoint, double, double, double)
Initializes a new instance of the vdRect object and registers it to the passed Document.
Fields
- mHeight
The height of the vdRect object.
- mWidth
The width of the vdRect object.
Properties
- BoundingBox
Gets the Bounding Box of the vdRect object in WorldCoordinate System.
- ECSMatrix
Gets the transformation Matrix that converts coordinates from the object's local coordinate system (object coordinate system, OCS) to the World Coordinate System (WCS).
- HatchProperties
Get/Set the hatch properties of the vdRect object.
- Height
Get/Set the height of the rectangle in drawing units.
- InsertionPoint
Get/Set the lower left point of the rectangle in World Coordinate System(WCS).
- Rotation
Get/Set the vertical rotation angle in radians of the rectangle.
- Width
Get/Set the width of the rectangle in drawing units.
Methods
- Area()
Calculates the enclosed area of the vdRect object in Drawing Units.
- AsPolyline()
Create a vdPolyline object with the same properties as the vdRect object.
- Break(gPoint, gPoint, out vdFigure)
Breaks the vdRect into one subpolylines.Deletes the part that is between p1,p2. Note that the vdRect after the break command will be Deleted and a newly created polyline will be added at the end of the rect's collection.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdRect object when opening in vdml format.
- Draw(vdRender)
Called in order to draw the object in a specified vdRender object.
- DrawGrip(int, Box, vdRender)
Overriden function in order to draw the center move grip differently.
- Explode()
Explodes the vdRect object into a vdPolyline object.
- GetCompareHash()
Returns a unique 32 bit integer value according to the object type and its properties values
- GetGripPoints()
A function returning the grip points of the object.
- GetSamplePoints(int, double)
Returns a list of points on the vdRect object from the start to the end point of the curve.
- GetValidGripPointsItems()
Returns the number of valid grip points of the object. Must return the same number of points as the GetGripPoints() method.
- InitializeProperties()
Resets the properties of the vdRect object to the Default values.
- InternalSetOwner(vdBaseObject)
Internally used only.
Set the object owner
- IntersectWith(vdFigure, VdConstInters, gPoints)
Finds the intersection points of an object with another object.
- Length()
Calculates the length of the vdRect object.
- MatchProperties(vdPrimary, vdDocument)
Matches all the common properties from an object and sets them to this object.
- MoveGripPointsAt(Int32Array, double, double, double)
This function is intended to be called during a grip edit of the object.
- PointOnCurve(gPoint, bool)
Returns if a point belongs to a vdRect object.
- Serialize(Serializer)
This Function is called when saving the vdRect object to vdml format.
- Split(gPoint, vdSelection)
Splits the Polyline into two newlly created Polylines devided by the passed point.
- TestOffsetSide(gPoint)
Tests if a point is inside a vdRect or not.
- ToMesh(int)
Converts the vdRect into a vdPolyface object.
- ToString()
Gets a System.String that represents the type of the vdRect Object.
- Transformby(Matrix)
Transforms all geometrical properties of this object by the specified Matrix.
- Update()
Updates the object after change of properties.
- getDistAtParam(double)
Get the length of the vdRect’s segment from the vdRect’s beginning to the point specified by param.
- getDistAtPoint(gPoint)
Get the length of the vdRect’s segment between the vdRect’s start point and point pt.
- getEndParam()
Return the end parameter for the vdRect object.
- getEndPoint()
Get the last point of the vdRect object(lower left) in World Coordinate System(WCS).
- getFirstOffsetParam()
Get a value representing the start of the vdRect object.
- getOffsetCurve(double)
Creates a new vdRect object at a specified distance and in the same plane with the existing rectangle.
- getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints)
Overrrides the getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints).
- getParamAtDist(double)
Gets the parameter of the object at the specific distance.
- getParamAtPoint(gPoint)
Get the parameter of the vdRect at a specified point given in WCS.
- getPointAtDist(double)
Gets a point belonging to the vdRect at the specified distance.
- getPointAtParam(double)
Returns a point on the vdRect representing a param in WCS.
- getStartParam()
Returns the start parameter for the vdRect object.
- getStartPoint()
Get the first point of the vdRect object(lower left) in World Coordinate System(WCS).