lv_draw_sw_utils.h
API reference for lv_draw_sw_utils.h
Functions
lv_draw_sw_i1_to_argb8888
Converts an I1 buffer to ARGB8888 format.
void lv_draw_sw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color)| Name | Type | Description |
|---|---|---|
buf_i1 | const void * | pointer to buffer with I1 formatted render |
buf_argb8888 | void * | pointer to buffer for ARGB8888 render |
width | uint32_t | width in pixels of the area. must be a multiple of 8. |
height | uint32_t | height in pixels of the area |
buf_i1_stride | uint32_t | stride of i1 buffer in bytes |
buf_argb8888_stride | uint32_t | stride of argb8888 buffer in bytes |
index0_color | uint32_t | color of the 0 bits of i1 buf |
index1_color | uint32_t | color of the 1 bits of i1 buf |
lv_draw_sw_rgb565_swap
Swap the upper and lower byte of an RGB565 buffer. Might be required if a 8bit parallel port or an SPI port send the bytes in the wrong order. The bytes will be swapped in place.
void lv_draw_sw_rgb565_swap(void *buf, uint32_t buf_size_px)| Name | Type | Description |
|---|---|---|
buf | void * | pointer to buffer |
buf_size_px | uint32_t | number of pixels in the buffer |
lv_draw_sw_i1_invert
Invert a draw buffer in the I1 color format. Conventionally, a bit is set to 1 during blending if the luminance is greater than 127. Depending on the display controller used, you might want to have different behavior. The inversion will be performed in place.
void lv_draw_sw_i1_invert(void *buf, uint32_t buf_size)| Name | Type | Description |
|---|---|---|
buf | void * | pointer to the buffer to be inverted |
buf_size | uint32_t | size of the buffer in bytes |
lv_draw_sw_i1_convert_to_vtiled
Convert a draw buffer in I1 color format from htiled (row-wise) to vtiled (column-wise) buffer layout. The conversion assumes that the buffer width and height is rounded to a multiple of 8.
void lv_draw_sw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb)| Name | Type | Description |
|---|---|---|
buf | const void * | pointer to the buffer to be converted |
buf_size | uint32_t | size of the buffer in bytes |
width | uint32_t | width of the buffer |
height | uint32_t | height of the buffer |
out_buf | void * | pointer to the output buffer |
out_buf_size | uint32_t | size of the output buffer in bytes |
bit_order_lsb | bool | bit order of the resulting vtiled buffer |
lv_draw_sw_rotate
Rotate a buffer into another buffer
void lv_draw_sw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format)| Name | Type | Description |
|---|---|---|
src | const void * | the source buffer |
dest | void * | the destination buffer |
src_width | int32_t | source width in pixels |
src_height | int32_t | source height in pixels |
src_stride | int32_t | source stride in bytes (number of bytes in a row) |
dest_stride | int32_t | destination stride in bytes (number of bytes in a row) |
rotation | lv_display_rotation_t | LV_DISPLAY_ROTATION_0/90/180/270 |
color_format | lv_color_format_t | LV_COLOR_FORMAT_RGB565/RGB888/XRGB8888/ARGB8888 |
Dependencies
How is this guide?
Last updated on