BitmapData#update()

update(x, y, width, height) → {Phaser.BitmapData}

This re-creates the BitmapData.imageData from the current context.
It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array.
If not given the dimensions defaults to the full size of the context.

Warning: This is a very expensive operation, so use it sparingly.

Parameters
Name Type Argument Default Description
x number <optional>
0

The x coordinate of the top-left of the image data area to grab from.

y number <optional>
0

The y coordinate of the top-left of the image data area to grab from.

width number <optional>
1

The width of the image data area.

height number <optional>
1

The height of the image data area.

Returns

This BitmapData object for method chaining.

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

Please login to continue.