Constructor
new module:Polygon(positionDefinition, points, optionsopt)
Polygon constructor
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
positionDefinition | PositionDefinition | Any position | |
points | Array.<PositionDefinition> | Set of vertices relative to position defining the polygon | |
options | ComponentOptions | <optional> | Drawing options |
- Source
Extends
Members
points :Array.<Position>
Type:
- Array.<Position>
Methods
(static) from(definition) → {Polygon}
Parameters:
Name | Type | Description |
---|---|---|
definition | Object | Polygon definition |
Returns:
- Type:
- Polygon
trace(path) → {Polygon}
Draw the polygon
Parameters:
Name | Type | Description |
---|---|---|
path | Path2D | Current drawing path |
- Overrides
Returns:
Itself
- Type:
- Polygon