I use lvgl@8.3.6
I don’t get tried a lot of functions
in this function lv_layer_t is missing
void my_draw_function(lv_layer_t *layer) {
// Erstelle einen Zeichnungsdeskriptor
lv_draw_rect_dsc_t rect_dsc;
lv_draw_rect_dsc_init(&rect_dsc);
rect_dsc.bg_color = lv_color_red;
rect_dsc.radius = 10;
rect_dsc.border_width = 2;
rect_dsc.border_color = lv_color_black;
// Definiere die Koordinaten des Rechtecks
lv_area_t rect_area;
rect_area.x1 = 10;
rect_area.y1 = 20;
rect_area.x2 = 100;
rect_area.y2 = 80;
// Zeichne das Rechteck
lv_draw_rect(layer, &rect_dsc, &rect_area);
}
Perhaps someone has an other function to draw a Rectangle