new Rectangle(x, y, w, h) → {Rectangle}
Describes a rectangle.
Parameters:
| Name | Type | Description |
|---|---|---|
x |
Number | The x position of the rectangle. |
y |
Number | The y position of the rectangle. |
w |
Number | The width of the rectangle. |
h |
Number | The height of the rectangle. |
- Source:
Returns:
- Type
- Rectangle
Methods
-
copy(rect)
-
Copies the data from a Rectangle.
Parameters:
Name Type Description rectRectangle The Rectangle to copy data from. - Source:
-
set(x, y, w, h)
-
Sets a Rectangle's properties.
Parameters:
Name Type Description xNumber The x position of the rectangle. yNumber The y position of the rectangle. wNumber The width of the rectangle. hNumber The height of the rectangle. - Source: