arch(draw): allow replacing the draw engine

BREAKING CHANGE: the API of lv_draw_... function have been changed
This commit is contained in:
Gabor Kiss-Vamosi
2021-11-29 14:54:37 +01:00
parent 0831b6ba76
commit db53ea925c
121 changed files with 3984 additions and 3382 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ static void draw_event_cb(lv_event_t * e)
a.x2 = dsc->p2->x - 1;
a.y1 = LV_MIN(dsc->p1->y, dsc->p2->y);
a.y2 = obj->coords.y2;
lv_draw_rect(&a, dsc->clip_area, &draw_rect_dsc);
lv_draw_rect(dsc->draw_ctx, &draw_rect_dsc, &a);
/*Remove the masks*/
lv_draw_mask_free_param(&line_mask_param);
+2 -2
View File
@@ -45,8 +45,8 @@ static void event_cb(lv_event_t * e)
a.y1 = chart->coords.y1 + p.y - 30;
a.y2 = chart->coords.y1 + p.y - 10;
const lv_area_t * clip_area = lv_event_get_clip_area(e);
lv_draw_rect(&a, clip_area, &draw_rect_dsc);
lv_draw_ctx_t * draw_ctx = lv_event_get_draw_ctx(e);
lv_draw_rect(draw_ctx, &draw_rect_dsc, &a);
ser = lv_chart_get_series_next(chart, ser);
}
+2 -2
View File
@@ -41,7 +41,7 @@ static void event_cb(lv_event_t * e)
draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_BLUE);
draw_rect_dsc.radius = 3;
lv_draw_rect(&a, dsc->clip_area, &draw_rect_dsc);
lv_draw_rect(dsc->draw_ctx, &draw_rect_dsc, &a);
lv_draw_label_dsc_t draw_label_dsc;
lv_draw_label_dsc_init(&draw_label_dsc);
@@ -50,7 +50,7 @@ static void event_cb(lv_event_t * e)
a.x2 -= 5;
a.y1 += 5;
a.y2 -= 5;
lv_draw_label(&a, dsc->clip_area, &draw_label_dsc, buf, NULL);
lv_draw_label(dsc->draw_ctx, &draw_label_dsc, &a, buf, NULL);
}
}
+1 -1
View File
@@ -40,7 +40,7 @@ static void draw_event_cb(lv_event_t *e)
a.x2 = dsc->p2->x;
a.y1 = LV_MIN(dsc->p1->y, dsc->p2->y);
a.y2 = obj->coords.y2 - 13; /* -13 cuts off where the rectangle draws over the chart margin. Without this an area of 0 doesnt look like 0 */
lv_draw_rect(&a, dsc->clip_area, &draw_rect_dsc);
lv_draw_rect(dsc->draw_ctx, &draw_rect_dsc, &a);
/*Remove the mask*/
lv_draw_mask_free_param(&line_mask_param);