Home
last modified time | relevance | path

Searched refs:canvas (Results 1 – 15 of 15) sorted by relevance

/lvgl-3.4.0/src/widgets/
Dlv_canvas.c33 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()
85 lv_canvas_t * canvas = (lv_canvas_t *)obj; in lv_canvas_set_px_color() local
87 lv_img_buf_set_px_color(&canvas->dsc, x, y, c); in lv_canvas_set_px_color()
[all …]
Dlv_canvas.h66 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.4.0/docs/widgets/core/
Dcanvas.md3 :github_url: |github_link_base|/widgets/core/canvas.md
22 To assign a buffer to a Canvas, use `lv_canvas_set_buffer(canvas, buffer, width, height, LV_IMG_CF_…
23 Where `buffer` is a static buffer (not just a local variable) to hold the image of the canvas.
28 The canvas supports all the built-in color formats like `LV_IMG_CF_TRUE_COLOR` or `LV_IMG_CF_INDEXE…
33 initialized with `lv_canvas_set_palette(canvas, 3, LV_COLOR_RED)`. It sets pixels with *index=3* t…
36 To set a pixel's color on the canvas, use `lv_canvas_set_px_color(canvas, x, y, LV_COLOR_RED)`.
40 …RUE_COLOR_ALPHA` or `LV_IMG_CF_ALPHA_...` format on the canvas, use `lv_canvas_set_px_opa(canvas, …
43 `lv_canvas_fill_bg(canvas, LV_COLOR_BLUE, LV_OPA_50)` fills the whole canvas to blue with 50% opaci…
46 An array of pixels can be copied to the canvas with `lv_canvas_copy_buf(canvas, buffer_to_copy, x, …
47 The color format of the buffer and the canvas need to match.
[all …]
Dindex.md16 canvas
/lvgl-3.4.0/examples/widgets/canvas/
Dlv_example_canvas_1.py25 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)
Dlv_example_canvas_2.py25 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)
Dlv_example_canvas_1.c30 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()
Dlv_example_canvas_2.c19 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()
Dindex.rst5 .. lv_example:: widgets/canvas/lv_example_canvas_1
11 .. lv_example:: widgets/canvas/lv_example_canvas_2
/lvgl-3.4.0/examples/widgets/label/
Dlv_example_label_4.c38 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.4.0/src/extra/libs/gif/
Dgifdec.c128 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 …]
Dgifdec.h45 uint8_t *canvas, *frame; member
Dlv_gif.c82 gifobj->imgdsc.data = gifobj->gif->canvas; in lv_gif_set_src()
/lvgl-3.4.0/docs/
DCHANGELOG.md83 - fix(canvas): force canvas to use sw draw [`3045`](https://github.com/littlevgl/lvgl/pull/3045)
106 - fix(canvas): off by one error in size check in lv_canvas_copy_buf [`2950`](https://github.com/lit…
352 - feat(canvas) add lv_canvas_set_px_opa [`b3b3ffc`](https://github.com/lvgl/lvgl/commit/b3b3ffc2b3b…
605 - feat(canvas) add lv_canvas_set_px_opa [`b3b3ffc`](https://github.com/lvgl/lvgl/commit/b3b3ffc2b3b…
629 - fix(canvas) invalidate the image on delete [`a1b362c`](https://github.com/lvgl/lvgl/commit/a1b362…
675 - fix(examples) adjust canvas example for MicroPython API change [`52d1c2e`](https://github.com/lvg…
1393 - `lv_img_set_angle`: set image object's angle without using canvas
1447 - `canvas`: allow drawing to true color alpha and alpha only canvas, add `lv_canvas_blur_hor/ver` a…
/lvgl-3.4.0/docs/overview/
Dimage.md111 …ion to create and display an image at run-time is to use the [Canvas](/widgets/core/canvas) object.