Represents an area filled with a pattern.
The hatch pattern can be composed of solid, dashed, or dash-dotted lines. The pattern can be mirrored or combined with its mirror image to create a 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[] =[]
Definition lines of the hatch.
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 the unique identifier of the object.
bigint
get numberOfContours():
number
Returns the number of hatch contours.
number
get numberOfDefinitionLines():
number
Returns the number of definition lines.
Use Hatch.definitionLines and definitionLines.length instead.
number
get uuid():
`${string}-${string}-${string}-${string}-${string}`|null
UUID of the drawing element.
The value is null if no UUID is assigned.
`${string}-${string}-${string}-${string}-${string}` | null
set uuid(
uuid):void
Sets the UUID of the drawing element.
`${string}-${string}-${string}-${string}-${string}` | null
UUID to assign to the drawing element.
void
accept(
visitor):void
Accepts an element visitor.
Element visitor to accept.
void
addContour(
contour,type?):boolean
Adds the hatch contour.
The contour must be closed. Otherwise it is not added and the method returns false.
Contour to add.
ContourType = ContourType.OUTER
Type of contour.
boolean
addDefinitionLine(
definitionLine):void
Adds the definition line to the hatch.
Definition line to add.
void
Use Hatch.definitionLines and definitionLines.push(definitionLine) instead.
contour(
index):PiecewiseContour
Returns the contour.
Throws a RangeError if index is not in the range [0, numberOfContours - 1].
number
Contour index.
definitionLine(
index):HatchDefinitionLine
Returns the definition line.
Throws a RangeError if index is not in the range [0, numberOfDefinitionLines - 1].
number
Definition line index.
Use Hatch.definitionLines and definitionLines[index] instead.
typeOfContour(
index):ContourType
Returns the type of hatch contour.
Throws a RangeError if index is not in the range [0, numberOfContours - 1].
number
Contour index.