mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 11:57:48 +08:00
refactor(vector): clean up the API of vector drawing (#8922)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a9f3ac781a
commit
8b6e87021f
@@ -24,7 +24,7 @@ void lv_example_canvas_8(void)
|
||||
lv_layer_t layer;
|
||||
lv_canvas_init_layer(canvas, &layer);
|
||||
|
||||
lv_vector_dsc_t * dsc = lv_vector_dsc_create(&layer);
|
||||
lv_draw_vector_dsc_t * dsc = lv_draw_vector_dsc_create(&layer);
|
||||
lv_vector_path_t * path = lv_vector_path_create(LV_VECTOR_PATH_QUALITY_MEDIUM);
|
||||
|
||||
lv_fpoint_t pts[] = {{10, 10}, {130, 130}, {10, 130}};
|
||||
@@ -33,12 +33,12 @@ void lv_example_canvas_8(void)
|
||||
lv_vector_path_line_to(path, &pts[2]);
|
||||
lv_vector_path_close(path);
|
||||
|
||||
lv_vector_dsc_set_fill_color(dsc, lv_color_make(0x00, 0x80, 0xff));
|
||||
lv_vector_dsc_add_path(dsc, path);
|
||||
lv_draw_vector_dsc_set_fill_color(dsc, lv_color_make(0x00, 0x80, 0xff));
|
||||
lv_draw_vector_dsc_add_path(dsc, path);
|
||||
|
||||
lv_draw_vector(dsc);
|
||||
lv_vector_path_delete(path);
|
||||
lv_vector_dsc_delete(dsc);
|
||||
lv_draw_vector_dsc_delete(dsc);
|
||||
|
||||
lv_canvas_finish_layer(canvas, &layer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user