lv_draw_sw_utils.h

API reference for lv_draw_sw_utils.h

Report on GitHub
Summary

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)
Parameters
NameTypeDescription
buf_i1const void *pointer to buffer with I1 formatted render
buf_argb8888void *pointer to buffer for ARGB8888 render
widthuint32_twidth in pixels of the area. must be a multiple of 8.
heightuint32_theight in pixels of the area
buf_i1_strideuint32_tstride of i1 buffer in bytes
buf_argb8888_strideuint32_tstride of argb8888 buffer in bytes
index0_coloruint32_tcolor of the 0 bits of i1 buf
index1_coloruint32_tcolor 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)
Parameters
NameTypeDescription
bufvoid *pointer to buffer
buf_size_pxuint32_tnumber 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)
Parameters
NameTypeDescription
bufvoid *pointer to the buffer to be inverted
buf_sizeuint32_tsize 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)
Parameters
NameTypeDescription
bufconst void *pointer to the buffer to be converted
buf_sizeuint32_tsize of the buffer in bytes
widthuint32_twidth of the buffer
heightuint32_theight of the buffer
out_bufvoid *pointer to the output buffer
out_buf_sizeuint32_tsize of the output buffer in bytes
bit_order_lsbboolbit 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)
Parameters
NameTypeDescription
srcconst void *the source buffer
destvoid *the destination buffer
src_widthint32_tsource width in pixels
src_heightint32_tsource height in pixels
src_strideint32_tsource stride in bytes (number of bytes in a row)
dest_strideint32_tdestination stride in bytes (number of bytes in a row)
rotationlv_display_rotation_tLV_DISPLAY_ROTATION_0/90/180/270
color_formatlv_color_format_tLV_COLOR_FORMAT_RGB565/RGB888/XRGB8888/ARGB8888

Dependencies

How is this guide?

Last updated on

On this page