BitmapData#setPixel32()

setPixel32(x, y, red, green, blue, alpha, immediate) → {Phaser.BitmapData}

Sets the color of the given pixel to the specified red, green, blue and alpha 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).

alpha number

The alpha color value, between 0 and 0xFF (255).

immediate boolean <optional>
true

If true the context.putImageData will be called and the dirty flag set.

Returns

This BitmapData object for method chaining.

Source code: gameobjects/BitmapData.js (Line 928)
doc_phaser
2017-02-14 10:37:14
Comments
Leave a Comment

Please login to continue.