Canvas Image: Difference between revisions

Jump to navigation Jump to search
m
(Added setPixel, dirtyPixels and fillRect)
Line 8: Line 8:
* '''Color Format''': Can be a vector of size 3 or 4 (rgba as 0 to 1). Or a string with hexadecimal colors, for example "#7f3f1f".
* '''Color Format''': Can be a vector of size 3 or 4 (rgba as 0 to 1). Or a string with hexadecimal colors, for example "#7f3f1f".
Will change a single pixel to a specified color in the image. End the changing by calling dirtyPixels.
Will change a single pixel to a specified color in the image. End the changing by calling dirtyPixels.
setPixel and fillRect is typically used when having to change an image alot. So to avoid using possibly hundreds of path elements on top of the image, changing the image pixel colors is more efficient.


= dirtyPixels =
= dirtyPixels =
574

edits

Navigation menu