/lvgl-3.5.0/src/widgets/ |
D | lv_canvas.c | 33 static void init_fake_disp(lv_obj_t * canvas, lv_disp_t * disp, lv_disp_drv_t * drv, lv_area_t * cl… 34 static void deinit_fake_disp(lv_obj_t * canvas, lv_disp_t * disp); 71 lv_canvas_t * canvas = (lv_canvas_t *)obj; in lv_canvas_set_buffer() local 73 canvas->dsc.header.cf = cf; in lv_canvas_set_buffer() 74 canvas->dsc.header.w = w; in lv_canvas_set_buffer() 75 canvas->dsc.header.h = h; in lv_canvas_set_buffer() 76 canvas->dsc.data = buf; in lv_canvas_set_buffer() 78 lv_img_set_src(obj, &canvas->dsc); in lv_canvas_set_buffer() 79 lv_img_cache_invalidate_src(&canvas->dsc); in lv_canvas_set_buffer() 86 lv_canvas_t * canvas = (lv_canvas_t *)obj; in lv_canvas_set_px_color() local [all …]
|
D | lv_canvas.h | 66 void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, lv_img_cf_t cf… 75 void lv_canvas_set_px_color(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c); 80 static inline void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c) in lv_canvas_set_px() argument 82 lv_canvas_set_px_color(canvas, x, y, c); in lv_canvas_set_px() 92 void lv_canvas_set_px_opa(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_opa_t opa); 105 void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color_t c); 118 lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y); 125 lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); 141 void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coo… 159 void lv_canvas_transform(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, uint16_t zoom, lv_co… [all …]
|
/lvgl-3.5.0/docs/widgets/core/ |
D | canvas.md | 18 To assign a buffer to a Canvas, use `lv_canvas_set_buffer(canvas, buffer, width, height, LV_IMG_CF_… 19 Where `buffer` is a static buffer (not just a local variable) to hold the image of the canvas. 24 The canvas supports all the built-in color formats like `LV_IMG_CF_TRUE_COLOR` or `LV_IMG_CF_INDEXE… 29 initialized with `lv_canvas_set_palette(canvas, 3, LV_COLOR_RED)`. It sets pixels with *index=3* t… 32 To set a pixel's color on the canvas, use `lv_canvas_set_px_color(canvas, x, y, LV_COLOR_RED)`. 36 …RUE_COLOR_ALPHA` or `LV_IMG_CF_ALPHA_...` format on the canvas, use `lv_canvas_set_px_opa(canvas, … 39 `lv_canvas_fill_bg(canvas, LV_COLOR_BLUE, LV_OPA_50)` fills the whole canvas to blue with 50% opaci… 42 An array of pixels can be copied to the canvas with `lv_canvas_copy_buf(canvas, buffer_to_copy, x, … 43 The color format of the buffer and the canvas need to match. 45 To draw something to the canvas use [all …]
|
D | index.md | 12 canvas
|
/lvgl-3.5.0/examples/widgets/canvas/ |
D | lv_example_canvas_1.py | 25 canvas = lv.canvas(lv.scr_act()) variable 26 canvas.set_buffer(cbuf, _CANVAS_WIDTH, _CANVAS_HEIGHT, lv.img.CF.TRUE_COLOR) 27 canvas.center() 28 canvas.fill_bg(lv.palette_lighten(lv.PALETTE.GREY, 3), lv.OPA.COVER) 30 canvas.draw_rect(70, 60, 100, 70, rect_dsc) 31 canvas.draw_text(40, 20, 100, label_dsc, "Some text on text canvas") 42 canvas.fill_bg(lv.palette_lighten(lv.PALETTE.GREY, 3), lv.OPA.COVER) 43 canvas.transform(img, 30, LV_IMG_ZOOM_NONE, 0, 0, _CANVAS_WIDTH // 2, _CANVAS_HEIGHT // 2, True)
|
D | lv_example_canvas_2.py | 25 canvas = lv.canvas(lv.scr_act()) variable 26 canvas.set_buffer(cbuf, CANVAS_WIDTH, CANVAS_HEIGHT, lv.img.CF.INDEXED_1BIT) 27 canvas.set_palette(0, LV_COLOR_CHROMA_KEY) 28 canvas.set_palette(1, lv.palette_main(lv.PALETTE.RED)) 38 canvas.fill_bg(c1, lv.OPA.COVER) 43 canvas.set_px(x, y, c0)
|
D | lv_example_canvas_1.c | 30 lv_obj_t * canvas = lv_canvas_create(lv_scr_act()); in lv_example_canvas_1() local 31 lv_canvas_set_buffer(canvas, cbuf, CANVAS_WIDTH, CANVAS_HEIGHT, LV_IMG_CF_TRUE_COLOR); in lv_example_canvas_1() 32 lv_obj_center(canvas); in lv_example_canvas_1() 33 lv_canvas_fill_bg(canvas, lv_palette_lighten(LV_PALETTE_GREY, 3), LV_OPA_COVER); in lv_example_canvas_1() 35 lv_canvas_draw_rect(canvas, 70, 60, 100, 70, &rect_dsc); in lv_example_canvas_1() 37 lv_canvas_draw_text(canvas, 40, 20, 100, &label_dsc, "Some text on text canvas"); in lv_example_canvas_1() 49 lv_canvas_fill_bg(canvas, lv_palette_lighten(LV_PALETTE_GREY, 3), LV_OPA_COVER); in lv_example_canvas_1() 50 …lv_canvas_transform(canvas, &img, 120, LV_IMG_ZOOM_NONE, 0, 0, CANVAS_WIDTH / 2, CANVAS_HEIGHT / 2… in lv_example_canvas_1()
|
D | lv_example_canvas_2.c | 19 lv_obj_t * canvas = lv_canvas_create(lv_scr_act()); in lv_example_canvas_2() local 20 lv_canvas_set_buffer(canvas, cbuf, CANVAS_WIDTH, CANVAS_HEIGHT, LV_IMG_CF_INDEXED_1BIT); in lv_example_canvas_2() 21 lv_canvas_set_palette(canvas, 0, LV_COLOR_CHROMA_KEY); in lv_example_canvas_2() 22 lv_canvas_set_palette(canvas, 1, lv_palette_main(LV_PALETTE_RED)); in lv_example_canvas_2() 32 lv_canvas_fill_bg(canvas, c1, LV_OPA_COVER); in lv_example_canvas_2() 39 lv_canvas_set_px_color(canvas, x, y, c0); in lv_example_canvas_2()
|
D | index.rst | 5 .. lv_example:: widgets/canvas/lv_example_canvas_1 11 .. lv_example:: widgets/canvas/lv_example_canvas_2
|
/lvgl-3.5.0/examples/widgets/label/ |
D | lv_example_label_4.c | 38 lv_obj_t * canvas = lv_canvas_create(lv_scr_act()); in lv_example_label_4() local 39 lv_canvas_set_buffer(canvas, mask_map, MASK_WIDTH, MASK_HEIGHT, LV_IMG_CF_ALPHA_8BIT); in lv_example_label_4() 40 lv_canvas_fill_bg(canvas, lv_color_black(), LV_OPA_TRANSP); in lv_example_label_4() 47 lv_canvas_draw_text(canvas, 5, 5, MASK_WIDTH, &label_dsc, "Text with gradient"); in lv_example_label_4() 50 lv_obj_del(canvas); in lv_example_label_4()
|
/lvgl-3.5.0/src/extra/libs/gif/ |
D | gifdec.c | 128 gif->canvas = (uint8_t *) &gif[1]; in gif_open() 130 gif->frame = &gif->canvas[4 * width * height]; in gif_open() 132 gif->frame = &gif->canvas[3 * width * height]; in gif_open() 134 gif->frame = &gif->canvas[2 * width * height]; in gif_open() 143 gif->canvas[i*4 + 0] = *(bgcolor + 2); in gif_open() 144 gif->canvas[i*4 + 1] = *(bgcolor + 1); in gif_open() 145 gif->canvas[i*4 + 2] = *(bgcolor + 0); in gif_open() 146 gif->canvas[i*4 + 3] = 0xff; in gif_open() 149 gif->canvas[i*3 + 0] = c.full & 0xff; in gif_open() 150 gif->canvas[i*3 + 1] = (c.full >> 8) & 0xff; in gif_open() [all …]
|
D | gifdec.h | 45 uint8_t *canvas, *frame; member
|
D | lv_gif.c | 82 gifobj->imgdsc.data = gifobj->gif->canvas; in lv_gif_set_src()
|
/lvgl-3.5.0/docs/ |
D | CHANGELOG.md | 135 - fix(canvas): fix clipéping on transformation [`b884aba`](https://github.com/lvgl/lvgl/commit/b884… 298 - fix(canvas):image cache may expire after set canvas's buff [`3267`](https://github.com/lvgl/lvgl/… 552 - fix(canvas): force canvas to use sw draw [`3045`](https://github.com/littlevgl/lvgl/pull/3045) 575 - fix(canvas): off by one error in size check in lv_canvas_copy_buf [`2950`](https://github.com/lit… 821 - feat(canvas) add lv_canvas_set_px_opa [`b3b3ffc`](https://github.com/lvgl/lvgl/commit/b3b3ffc2b3b… 1074 - feat(canvas) add lv_canvas_set_px_opa [`b3b3ffc`](https://github.com/lvgl/lvgl/commit/b3b3ffc2b3b… 1098 - fix(canvas) invalidate the image on delete [`a1b362c`](https://github.com/lvgl/lvgl/commit/a1b362… 1144 - fix(examples) adjust canvas example for MicroPython API change [`52d1c2e`](https://github.com/lvg… 1862 - `lv_img_set_angle`: set image object's angle without using canvas 1916 - `canvas`: allow drawing to true color alpha and alpha only canvas, add `lv_canvas_blur_hor/ver` a…
|
/lvgl-3.5.0/docs/overview/ |
D | image.md | 107 …ion to create and display an image at run-time is to use the [Canvas](/widgets/core/canvas) object.
|