Represents an area filled with a pattern.
The hatch pattern can be composed of solid, dashed or dash-doted lines. The pattern can be mirrored or composed with its mirror image to create double hatch. It follows the scheme used by AutoCAD to represent the set of ANSI-standard hatch patterns.
new Hatch():
Hatch
Hatch
angle:
number=0
Angle of the hatch.
readonlydefinitionLines:HatchDefinitionLine[] =[]
Collection of definition lines.
pattern:
PatternType=PatternType.SOLID
Hatch pattern.
scale:
number=1
Scale of the hatch.
style:
StyleType=StyleType.STANDARD
Style of the hatch pattern.
get id():
bigint
Returns object id.
bigint
get numberOfContours():
number
Returns the number of hatch contours.
number
get numberOfDefinitionLines():
number
Returns the number of definition lines.
Use definitionLines.length instead.
number
get uuid():
`${string}-${string}-${string}-${string}-${string}`|null
Returns uuid of the drawing element. null if the drawing element has no assigned uuid (by default).
`${string}-${string}-${string}-${string}-${string}` | null
set uuid(
uuid):void
Sets uuid of the drawing element.
Uuid of the drawing element.
`${string}-${string}-${string}-${string}-${string}` | null
void
accept(
visitor):void
Accepts a drawing element visitor.
Accepted drawing element visitor.
void
addContour(
contour,type):boolean
Adds the hatch contour.
Added contour.
ContourType = ContourType.OUTER
Type of contour.
boolean
addDefinitionLine(
definitionLine):void
Adds the definition line to the hatch.
Added definition line.
void
Use definitionLines.push(`definitionLine`) instead.
contour(
index):PiecewiseContour
Returns the contour.
Throws exception if index is not in range [0, numberOfContours()-1].
number
Contour index.
index must be in the range [0, numberOfContours()-1].
definitionLine(
index):HatchDefinitionLine
Returns the definition line.
Throws exception if index is not in range [0, numberOfDefinitionLines()-1].
number
Definition line index.
index must be in the range [0, numberOfDefinitionLines()-1].
Use definitionLines[`index`] instead.
typeOfContour(
index):ContourType
Returns the type of hatch contour.
Throws exception if index is not in range [0, numberOfContours()-1].
number
Contour index.
index must be in the range [0, numberOfContours()-1].