Class: PolygonArray
PathBuilding.PolygonArray(…polygons)
Typed array based on Polygons. Array constructor with length is not available.
Constructor
new PolygonArray(…polygons)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
polygons | VarArgs.<PathBuilding.Polygon> | <repeatable> |
Properties:
Name | Type | Description |
---|---|---|
bounds | Common.Rect | Union of polygons bounds |
Since:
- version 3.0.5
Extends
- Array
Methods
clone() → PathBuilding.PolygonArray
Clone instance
Returns:
PolygonArray instance
Type
push(…polygons)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
polygons | VarArgs.<PathBuilding.Polygon> | <repeatable> |
toJSON() → {JSON}
Serialize to JSON
Returns:
PolygonArray data
Type
JSON
transform(matrix) → PathBuilding.PolygonArray
Transform all polygons
Parameters:
Name | Type | Description |
---|---|---|
matrix | Common.Matrix | Transform matrix |
Returns:
poly Transformed polygon
Type
transformSelf(matrix)
Self transform all polygons
Parameters:
Name | Type | Description |
---|---|---|
matrix | Common.Matrix | Transform matrix |
(static) fromJSON(data) → PathBuilding.PolygonArray
Deserialize from JSON
Parameters:
Name | Type | Description |
---|---|---|
data | JSON | PolygonArray data |
Returns:
PolygonArray instance
Type