Reference updatePixels()

updatePixels()

Updates the canvas with the RGBA values in the pixels array.

updatePixels() only needs to be called after changing values in the pixels array. Such changes can be made directly after calling loadPixels() or by calling set().

Examples

Syntax

updatePixels([x], [y], [w], [h])

Parameters

x

x-coordinate of the upper-left corner of region to update.

y

y-coordinate of the upper-left corner of region to update.

w

width of region to update.

h

height of region to update.

Notice any errors or typos? Please let us know. Please feel free to edit src/image/pixels.js and open a pull request!

Related References