%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
hatch Method
See Also  Example
vdWebLibrary Namespace > ScriptCommands Class : hatch Method
HatchPatternName
The name of hatch pattern that must exist in the GetHatchPatterns If it is not exist the Active Hatch is set to null for no fill
FillBkColor
A string color colorToString that represents the fill back color of the hatch. Set it to 'byblock' for no FillBkColor
FillColor
A string color colorToString that represents the fill color of the hatch lines. Set it to 'byblock' in order entity PenColor to be used
hatchscale
A double value used to scale the selected HatchPattern
hatchangle
A double value in radians used to rotate the selected HatchPattern
transparency
A transparency value in range 0 to 255
drawboundary
1 for draw boundary , 0 for no boundary draw.
Select active hatch properties for hatched filled objects (rect polyline circle arc ellipse).

Syntax

JScript 
public function hatch( 
   HatchPatternName : String,
   FillBkColor : String,
   FillColor : String,
   hatchscale : double,
   hatchangle : double,
   transparency : int,
   drawboundary : int
);

Parameters

HatchPatternName
The name of hatch pattern that must exist in the GetHatchPatterns If it is not exist the Active Hatch is set to null for no fill
FillBkColor
A string color colorToString that represents the fill back color of the hatch. Set it to 'byblock' for no FillBkColor
FillColor
A string color colorToString that represents the fill color of the hatch lines. Set it to 'byblock' in order entity PenColor to be used
hatchscale
A double value used to scale the selected HatchPattern
hatchangle
A double value in radians used to rotate the selected HatchPattern
transparency
A transparency value in range 0 to 255
drawboundary
1 for draw boundary , 0 for no boundary draw.

Example

C#Copy Code
vdcanvas.scriptCommand.hatch("U2","0,255,0","255,0,0",0.2,vdgeo.DegreesToRadians(45), 255); 
vdcanvas.scriptCommand.circle();//a Filled circle will be created with a double hatch with background color green , hatched lines red , scale 0.2 and rotation 45 degrees

See Also