PixelData

Data structure containing video data.

This structure is used to provide lua with an optimized way to do GetPixel and SetPixel, the buffer is kept on the lua side minimizing read and write overhead.

Static Methods

PixelData.new( width number, height number, color color ) PixelData

Constructor used to create a PixelData.
width and height represent its size while color defines the color with which it is initialized.

Properties

Width number read only

Width in pixels of the buffer.

Height number read only

Height in pixels of the buffer.

Methods

GetPixel( x number, y number ) color

Returns the color of the pixel at the coordinate specified by x and y.

SetPixel( x number, y number, color color )

Sets the color of the pixel at the coordinate specified by x and y.