This struct defines the layout of the pixel data in a frame-buffer.
lock() method of the LCD protocol expects to be given a pointer to
this structure. You can generate a suitable instance by calling
The structure contains these fields:
- This points to the buffer for the rasterized pixel data. The controller can write pixels into this buffer, but must stick within the bounds specified by the width and height.
- The number of bytes between consecutive raster lines in the pixel data. This can be greater than the number of bytes per line.
- The width, in pixels, of the render area. This value
can be less than the width requested by the LCD controller when
- The height, in pixels, of the render area. This
value can be less than the height requested by the LCD controller
when it called
- This structure defines the format of the pixel data in the raster buffer.
- This is set to true if the pixel format or buffer
size has changed since the previous call to
Pixel data is represented as a one-dimensional array of bytes.
The top-left pixel is pointed to by the buffer member. Each pixel
takes up a number of bytes, given by
The pixel at location (x, y) is stored in the memory bytes
buffer[y * pitch + x * format.pbytes].