format
typescript
new Rect ((x, y, w, h))description
Create a new Rect object.
parameter
| param_name | type | description |
|---|---|---|
| x | number? | The x coordinate of the top-left corner of the Rect. |
| y | number? | The y coordinate of the top-left corner of the Rect. |
| w | number? | The width of the Rect. |
| h | number? | The height of the Rect. |
code example
javascript
let rect:Rect = new Rect(0, 0, 100, 100);