mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-21 06:53:01 +08:00
add offset member to lv_img_ext_t
This commit is contained in:
parent
e298f493ce
commit
c2e3e9d494
@ -40,7 +40,7 @@ typedef struct
|
||||
/*No inherited ext. because inherited from the base object*/ /*Ext. of ancestor*/
|
||||
/*New data for this type */
|
||||
const void * src; /*Image source: Pointer to an array or a file or a symbol*/
|
||||
|
||||
lv_point_t offset;
|
||||
lv_coord_t w; /*Width of the image (Handled by the library)*/
|
||||
lv_coord_t h; /*Height of the image (Handled by the library)*/
|
||||
#if USE_LV_MULTI_LANG
|
||||
@ -103,6 +103,14 @@ static inline void lv_img_set_file(lv_obj_t * img, const char * fn)
|
||||
*/
|
||||
void lv_img_set_auto_size(lv_obj_t * img, bool autosize_en);
|
||||
|
||||
/**
|
||||
* Set an offset for the source of an image.
|
||||
* so the image will be displayed from this new origin.
|
||||
* @param img pointer to an image
|
||||
* @param en true: auto size enable, false: auto size disable
|
||||
*/
|
||||
void lv_img_set_offset(lv_obj_t *img, lv_point_t offset);
|
||||
|
||||
/**
|
||||
* Set the style of an image
|
||||
* @param img pointer to an image object
|
||||
|
Loading…
x
Reference in New Issue
Block a user