TextureData:getPixel

Returns the value of a pixel of the TextureData.

r, g, b, a = TextureData:getPixel(x, y)

Arguments

NameTypeDescription
xnumberThe x coordinate of the pixel to get (0-indexed).
ynumberThe y coordinate of the pixel to get (0-indexed).

Returns

NameTypeDescription
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.
anumberThe alpha component of the pixel, from 0.0 to 1.0.

See also