Managing pixel data, framebuffers, and drawing operations. More...
![]() |
Modules | |
Pixel Displays | |
Functions for opening and closing pixel displays. | |
Pixel Frames | |
Functions for pixel frames. | |
Files | |
file | types.h |
Common pixel types and structures. | |
Data Structures | |
struct | pix_point_t |
Point structure representing X,Y coordinates. More... | |
struct | pix_size_t |
Size structure representing width and height dimensions. More... | |
Typedefs | |
typedef uint32_t | pix_color_t |
Color value type for pixel operations. More... | |
Enumerations | |
enum | pix_format_t { PIX_FMT_RGBA32, PIX_FMT_MONO } |
Pixel format enumeration defining color depth and layout. More... | |
enum | pix_op_t { PIX_SET } |
Pixel operation types for drawing operations. More... | |
Functions | |
void | pix_init (void) |
Initializes the pixel system on startup. More... | |
void | pix_exit (void) |
Cleans up the pixel system on shutdown. More... | |
Managing pixel data, framebuffers, and drawing operations.
Pixels are represented in various formats, but externally they are typically represented in RGBA32 format (a uint32_t). If a frame is "drawable", it means it can be safely accessed and modified by drawing operations. The drawable state can be set by windowing or device systems that may update the rendered surface concurrently.
Sizes are represented as structures with uint16_t fields for dimensions, allowing for values between 0 and 65535. Points are represented as structures with int16_t fields for coordinates, allowing for values between -32768 and 32767.
Frames do require a significant amount of memory, so they should be used judiciously. On embedded systems, PIX_FMT_RGB332 provides limited color depth but is memory efficient.
typedef uint32_t pix_color_t |
enum pix_format_t |
Pixel format enumeration defining color depth and layout.
Enumerator | |
---|---|
PIX_FMT_RGBA32 | 32-bit RGBA format with alpha channel |
PIX_FMT_MONO | Monochrome format (1-bit per pixel) |
Definition at line 35 of file types.h.
enum pix_op_t |
void pix_exit | ( | void | ) |
Cleans up the pixel system on shutdown.
This function should be called at the end of the program to perform any necessary cleanup tasks.
void pix_init | ( | void | ) |
Initializes the pixel system on startup.
This function must be called at the start of the program to initialize the pixel environment.