lv_draw_image.h
API reference for lv_draw_image.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_draw_image_private.h
Summary
Functions
draw/lv_draw_image.h:130function
lv_draw_task_get_image_dsc
Try to get an image draw descriptor from a draw task.
lv_draw_image_dsc_t * lv_draw_task_get_image_dsc(lv_draw_task_t *task)| Name | Type | Description |
|---|---|---|
task | lv_draw_task_t * | draw task |
Returns: lv_draw_image_dsc_t * — the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_IMAGE
draw/lv_draw_image.h:161function
lv_image_src_get_type
Get the type of an image source
lv_image_src_t lv_image_src_get_type(const void *src)| Name | Type | Description |
|---|---|---|
src | const void * | pointer to an image source: - pointer to an 'lv_image_t' variable (image stored internally and compiled into the code) - a path to a file (e.g. "S:/folder/image.bin") - or a symbol (e.g. LV_SYMBOL_CLOSE) |
Returns: lv_image_src_t — type of the image source LV_IMAGE_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN
Structs
struct
_lv_draw_image_dsc_t
| Member | Type | Description |
|---|---|---|
base | lv_draw_dsc_base_t | |
src | const void * | The image source: pointer to lv_image_dsc_t or a path to a file |
header | lv_image_header_t | The header of the image. Initialized internally in lv_draw_image |
clip_radius | int32_t | Clip the corner of the image with this radius. Use LV_RADIUS_CIRCLE for max. radius |
rotation | int32_t | The rotation of the image in 0.1 degree unit. E.g. 234 means 23.4° |
scale_x | int32_t | Horizontal scale (zoom) of the image. 256 (LV_SCALE_NONE): means no zoom, 512 double size, 128 half size. |
scale_y | int32_t | Same as scale_y but vertically |
skew_x | int32_t | Parallelogram like transformation of the image horizontally in 0.1 degree unit. E.g. 456 means 45.6°. |
skew_y | int32_t | Same as skew_x but vertically |
pivot | lv_point_t | The pivot point of transformation (scale and rotation). 0;0 is the top left corner of the image. Can be outside of the image too. |
recolor | lv_color_t | Mix this color to the images. In case of LV_COLOR_FORMAT_A8 it will be the color of the visible pixels |
recolor_opa | lv_opa_t | The intensity of recoloring. 0 means, no recolor, 255 means full cover (transparent pixels remain transparent) |
opa | lv_opa_t | Opacity in 0...255 range. LV_OPA_TRANSP, LV_OPA_10, LV_OPA_20, .. LV_OPA_COVER can be used as well |
blend_mode | lv_blend_mode_t | Describes how to blend the pixels of the image to the background. See lv_blend_mode_t for more details. |
antialias | uint16_t | 1: perform the transformation with anti-aliasing |
tile | uint16_t | If the image is smaller than the image_area field of lv_draw_image_dsc_t tile the image (repeat is both horizontally and vertically) to fill the image_area area |
colorkey | const lv_image_colorkey_t * | |
sup | lv_draw_image_sup_t * | Used internally to store some information about the palette or the color of A8 images |
image_area | lv_area_t | Used to indicate the entire original, non-clipped area where the image is to be drawn. This is important for: 1. Layer rendering, where it might happen that only a smaller area of the layer is rendered and e.g. clip_radius needs to know what the original image was.2. Tiled images, where the target draw area is larger than the image to be tiled. |
bitmap_mask_src | const lv_image_dsc_t * | Pointer to an A8 or L8 image descriptor to mask the image with. The mask is always center aligned. |
Typedefs
draw/lv_draw_image.h:111typedef
lv_draw_image_core_cb
typedef void(* lv_draw_image_core_cb) (lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area)PErform the actual rendering of a decoded image
Used by 2 functions
lv_draw_image_normal_helper— paramdraw_core_cblv_draw_image_tiled_helper— paramdraw_core_cb
Dependencies
Indirect dependencies
lv_anim.hlv_area.hlv_array.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_image_dsc.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style_gen.hlv_symbol_def.hlv_text.hlv_tick.hlv_timer.hlv_types.h
How is this guide?
Last updated on