setPixel(x, y, red, green, blue, immediate) → {Phaser.BitmapData}
Sets the color of the given pixel to the specified red, green and blue values.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
x | number | The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. | ||
y | number | The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. | ||
red | number | The red color value, between 0 and 0xFF (255). | ||
green | number | The green color value, between 0 and 0xFF (255). | ||
blue | number | The blue color value, between 0 and 0xFF (255). | ||
immediate | boolean | <optional> | true | If |
Returns
This BitmapData object for method chaining.
- Source code: gameobjects/BitmapData.js (Line 967)
Please login to continue.