使用 RGBA 值更新画布 pixels数组。
在 pixels 数组改值后,才需要调用updatePixels()。在调用loadPixels() 或 set() 以后,此类更改可以直接进行。
示例
语法
updatePixels([x], [y], [w], [h])
参数
x
数字:
需要更新的区域左上角的 x 坐标。
y
数字:
需要更新区域左上角的 y 坐标。
w
数字:
需要更新的区域宽度。
h
数字:
需要更新的区域高度。
This page is generated from the comments in src/image/pixels.js . Please feel free to edit it and submit a pull request!