lv_draw_sw_utils.h
Functions
-
void lv_draw_sw_rgb565_swap(void *buf, uint32_t buf_size_px)
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.
- 参数:
buf -- pointer to buffer
buf_size_px -- number of pixels in the buffer
-
void lv_draw_sw_i1_invert(void *buf, uint32_t buf_size)
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.
- 参数:
buf -- pointer to the buffer to be inverted
buf_size -- size of the buffer in bytes
-
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)
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.
- 参数:
buf -- pointer to the buffer to be converted
buf_size -- size of the buffer in bytes
width -- width of the buffer
height -- height of the buffer
out_buf -- pointer to the output buffer
out_buf_size -- size of the output buffer in bytes
bit_order_lsb -- bit order of the resulting vtiled 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)
Rotate a buffer into another buffer
- 参数:
src -- the source buffer
dest -- the destination buffer
src_width -- source width in pixels
src_height -- source height in pixels
src_stride -- source stride in bytes (number of bytes in a row)
dest_stride -- destination stride in bytes (number of bytes in a row)
rotation -- LV_DISPLAY_ROTATION_0/90/180/270
color_format -- LV_COLOR_FORMAT_RGB565/RGB888/XRGB8888/ARGB8888