Class vdHatchProperties
- Namespace
- VectorDraw.Professional.vdObjects
- Assembly
- VectorDraw.Professional.dll
Represents the collection of hatching and fill-related properties used to render or explode filled regions for a host figure (IvdHatchFigure).
public sealed class vdHatchProperties : vdBaseObject, IDisposable, IVDSerialise, IBaseObject, ICloneable
- Inheritance
-
vdHatchProperties
- Implements
- Inherited Members
Examples
Example: create a rectangle and apply a custom hatch pattern:
var pattern = doc.HatchPatterns.Add("dashed");
pattern.PatternLines.AddItem(new VectorDraw.DrawElements.grPatternLine(45, 0, 0, 0, 0.1, new double[] {0.1, -0.1}, true));
var rect = new vdRect(doc, new gPoint(0,0), 5, 5, 0);
rect.HatchProperties = new vdHatchProperties(VdConstFill.VdFillModePattern);
rect.HatchProperties.HatchPattern = pattern;
doc.Model.Entities.AddItem(rect);
doc.ZoomExtents();
doc.Redraw(false);
Remarks
vdHatchProperties centralizes all settings that control how a figure's interior is filled. Supported fill modes include solid fills, built-in and custom patterns, block-based tiling, and image-based fills. Properties include colors, background color, gradient parameters, hatch pattern, hatch image, hatch block, scale, angle, origin and block offsets.
Constructors
- vdHatchProperties()
Initializes the vdHatchProperties object.
- vdHatchProperties(VdConstFill)
Initializes the vdHatchProperties object.
Properties
- BlockOffsetXdir
Controls the X offset of each blockreference for block hatch pattern generation.
- BlockOffsetYdir
Controls the Y offset of each blockreference for block hatch pattern generation.
- DrawBoundary
Get/Set a boolean value representing if the boundary of the hatch will be drawn.
- FillBkColor
Get/Set the fill back color of the hatch.
- FillColor
Get/Set the fill color of the hatch.
- FillMode
Get/Set the fill mode of the object.
- HatchAngle
Get/Set the hatch angle of the object.
- HatchBlock
Get/Set the hatch block used when fill mode is VdFillModeHatchBlock.
- HatchImage
Get/Set the Hatch Image of the object when fillmode is VdFillModeImage.
- HatchMode
Controls the hatching in special occasions.
- HatchOrigin
Controls the starting location in World Coordinate System for hatch pattern generation.
- HatchPattern
Gets or sets the hatch pattern used when the hatch FillMode is VdFillModePattern.
- HatchScale
Get/Set the hatch scale of the object.
- Solid2dTransparency
Get/Set a value representing the transparency when the fillmode is solid and when the Document is rendered in Wire2d using GdiPlus API.
- gradientAngle
Get/Set the gradient direction angle in radians.
- gradientColor2
Get/Set the gradient ending color.
- gradientTypeProp
Get/Set the gradient fill type.
Methods
- Clone()
Returns a new created vdHatchProperties object as clone to this one.
- CopyFrom(vdHatchProperties)
Copies all properties from a vdHatchProperties to this object.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdHatchProperties object when opening in vdml format.
- Dispose()
Releases all resources used by this object.
- Explode()
Returns a collection of all hatch primitives sub entities.
- GetCompareHashCode()
Returns a 32-bit signed integer hash code for this object instance.
- GetFilledPolygons(int, double)
Returns a collection of gPoints closed regions that is filled with selected FillMode
- GetFilledRegions(int, double)
Returns a collection of vdPolyline closed regions that is filled with selected FillMode
- GetOutlineCountours(int, double)
Returns an array of gPoints thta represent the outlines of hatch regions
- GetTableDependecies(vdTableDependeciesArgs)
Fills the passed vdTableDependeciesArgs args with all the table references of this object (vdLayer, vdBlock, vdDimstyle, vdLineType, vdTextstyle, vdImageDef, vdHatchPattern etc).
- InternalSetOwner(vdBaseObject)
Internally used only.
Set the object owner
- Invalidate()
Invalidate the owner of the object if exist.
- Is2D(double)
Checks if all points are belong into the same plane
- IsTableObjectDependOn(vdPrimary)
Check if the table object is depend on this figure
- OnDocumentSelected(vdDocument)
This method is called when the object is inserted in a Document for the first time.
- OnOwnerChanged()
This method is called when the object's owner is changed.
- Serialize(Serializer)
This Function is called when saving the vdHatchProperties object to vdml format.
- ToString()
Gets a System.String that represents the Fillmode of the vdHatchProperties Object.
- Transformby(double, double)
Applies a rotation and uniform scale to the hatch-related geometric properties.
- Transformby(Matrix)
Transforms all the geometrical properties of the object using the specified transformation matrix.
- Update()
Updates the object after change of properties.