rect(x, y, width, height, fillStyle) → {Phaser.BitmapData}
Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
x | number | The x coordinate of the top-left of the Rectangle. | |
y | number | The y coordinate of the top-left of the Rectangle. | |
width | number | The width of the Rectangle. | |
height | number | The height of the Rectangle. | |
fillStyle | string | <optional> | If set the context fillStyle will be set to this value before the rect is drawn. |
Returns
This BitmapData object for method chaining.
- Source code: gameobjects/BitmapData.js (Line 1825)
Please login to continue.