getPixel32(x, y) → {number}
Get the color of a specific pixel including its alpha value.
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.
Parameters
Name | Type | 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. |
Returns
number -
A native color value integer (format: 0xAARRGGBB)
- Source code: gameobjects/BitmapData.js (Line 1016)
Please login to continue.