Constructor
new module:Rectangle(positionDefinition, widthopt, heightopt, optionsopt)
Rectangle constructor
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
positionDefinition | PositionDefinition | Position in space | ||
width | Number | <optional> | 0 | Horizontal size |
height | Number | <optional> | 0 | Vertical size |
options | ComponentOptions | <optional> | Drawing options |
Extends
Members
(static) origins :RectangleOrigins
Type:
- RectangleOrigins
height :Number
Type:
- Number
width :Number
Type:
- Number
Methods
(static) from(definition) → {Rectangle}
Parameters:
Name | Type | Description |
---|---|---|
definition | Object | Rectangle definition |
Returns:
- Type:
- Rectangle
trace(path) → {Rectangle}
Draw the rectangle
Parameters:
Name | Type | Description |
---|---|---|
path | path | Drawing context |
- Overrides
Returns:
Itself
- Type:
- Rectangle
Type Definitions
RectangleOrigins
Type:
Properties- Object
Name | Type | Description |
---|---|---|
topLeft | String | |
topRight | String | |
topCenter | String | |
center | String | |
centerLeft | String | |
centerRight | String | |
bottomLeft | String | |
bottomRight | String | |
bottomCenter | String |