TextureData:setPixel

Sets the value of a pixel of the TextureData.

TextureData:setPixel(x, y, r, g, b, a)

Arguments

NameTypeDefaultDescription
xnumberThe x coordinate of the pixel to get (0-indexed).
ynumberThe y coordinate of the pixel to get (0-indexed).
rnumberThe red component of the pixel, from 0.0 to 1.0.
gnumberThe green component of the pixel, from 0.0 to 1.0.
bnumberThe blue component of the pixel, from 0.0 to 1.0.
anumber1.0The alpha component of the pixel, from 0.0 to 1.0.

Returns

Nothing

See also