lv_obj_draw.h

API reference for lv_obj_draw.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_obj_draw_private.h

Functions

lv_obj_set_ext_draw_size

Set a custom extra draw area (around the widget) to draw shadow, outline, or children etc.

 
void lv_obj_set_ext_draw_size(lv_obj_t *obj, int32_t size)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an object
sizeint32_tthe extra size to allow around the object

LV_OBJ_FLAG_OVERFLOW_VISIBLE should be set on obj to allow the children overflowing the parent.

Enums

lv_layer_type_t

Store the type of layer required to render a widget.

NameDescription
LV_LAYER_TYPE_NONENo layer is needed.
LV_LAYER_TYPE_SIMPLESimple layer means that the layer can be rendered in chunks. For example with opa_layered = 140 it's possible to render only 10 lines from the layer. When it's ready go to the next 10 lines. It avoids large memory allocations for the layer buffer. The buffer size for a chunk can be set by LV_DRAW_LAYER_SIMPLE_BUF_SIZE in lv_conf.h.
LV_LAYER_TYPE_TRANSFORMThe widget is transformed and cannot be rendered in chunks. It's because - due to the transformations - pixel outside of a given area will also contribute to the final image. In this case there is no limitation on the buffer size. LVGL will allocate as large buffer as needed to render the transformed area.

Dependencies

Last updated on

On this page