574
edits
m (Fix url) |
(Added setPixel, dirtyPixels and fillRect) |
||
Line 1: | Line 1: | ||
[[Category:Canvas Elements]] | [[Category:Canvas Elements]] | ||
{{Template:Canvas Navigation}} | {{Template:Canvas Navigation}} | ||
= setPixel = | |||
* '''Version''': FlightGear >= 2020.1 | |||
* '''Format''': setPixel(x_position, y_position, color) | |||
* '''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. | |||
= dirtyPixels = | |||
* '''Version''': FlightGear >= 2020.1 | |||
After operations on setPixel is done, the method dirtyPixels() must be run. | |||
= fillRect = | |||
* '''Version''': FlightGear >= 2020.1 | |||
* '''Format''': fillRect(dimension, color) | |||
* '''Dimension Format''': Can be a vector of size 4 [x_position,y_position,x_size,y_size]. The numbers is in absolute pixel coordinates, not 0 to 1. | |||
* '''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 fill a specified rectangle inside the image with a specified color. | |||
= Properties = | = Properties = |
edits