16 #ifdef LV_CONF_INCLUDE_SIMPLE 19 #include "../../../lv_conf.h" 22 #if LV_USE_CANVAS != 0 24 #include "../lv_core/lv_obj.h" 25 #include "../lv_objx/lv_img.h" 46 typedef uint8_t lv_canvas_style_t;
76 void lv_canvas_set_buffer(
lv_obj_t * canvas,
void * buf, lv_coord_t w, lv_coord_t h,
lv_img_cf_t cf);
85 void lv_canvas_set_px(
lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c);
97 void lv_canvas_set_palette(
lv_obj_t * canvas, uint8_t
id, lv_color_t c);
105 void lv_canvas_set_style(
lv_obj_t * canvas, lv_canvas_style_t type,
const lv_style_t * style);
118 lv_color_t lv_canvas_get_px(
lv_obj_t * canvas, lv_coord_t x, lv_coord_t y);
133 const lv_style_t * lv_canvas_get_style(
const lv_obj_t * canvas, lv_canvas_style_t type);
149 void lv_canvas_copy_buf(
lv_obj_t * canvas,
const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coord_t w,
165 void lv_canvas_rotate(
lv_obj_t * canvas,
lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, lv_coord_t offset_y,
166 int32_t pivot_x, int32_t pivot_y);
173 void lv_canvas_fill_bg(
lv_obj_t * canvas, lv_color_t color);
184 void lv_canvas_draw_rect(
lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h,
197 void lv_canvas_draw_text(
lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w,
const lv_style_t * style,
198 const char * txt, lv_label_align_t align);
206 void lv_canvas_draw_img(
lv_obj_t * canvas, lv_coord_t x, lv_coord_t y,
const void * src,
const lv_style_t * style);
236 void lv_canvas_draw_arc(
lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle,
242 #define LV_CANVAS_BUF_SIZE_TRUE_COLOR(w, h) ((LV_COLOR_SIZE / 8) * w * h) 243 #define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_SIZE / 8) * w * h) 244 #define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h) 247 #define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) ((((w / 8) + 1) * h)) 248 #define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) ((((w / 4) + 1) * h)) 249 #define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) ((((w / 2) + 1) * h)) 250 #define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) ((w * h)) 253 #define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2) 254 #define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4) 255 #define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16) 256 #define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256) uint8_t lv_img_cf_t
Definition: lv_img_decoder.h:116
struct _lv_obj_t * par
Definition: lv_obj.h:186
Definition: lv_img_decoder.h:120
Definition: lv_style.h:57