Home
last modified time | relevance | path

Searched refs:label_size (Results 1 – 3 of 3) sorted by relevance

/lvgl-3.7.0/examples/widgets/slider/
Dlv_example_slider_3.c40 lv_point_t label_size; in slider_event_cb() local
41 lv_txt_get_size(&label_size, buf, LV_FONT_DEFAULT, 0, 0, LV_COORD_MAX, 0); in slider_event_cb()
43 … label_area.x1 = dsc->draw_area->x1 + lv_area_get_width(dsc->draw_area) / 2 - label_size.x / 2; in slider_event_cb()
44 label_area.x2 = label_area.x1 + label_size.x; in slider_event_cb()
46 label_area.y1 = label_area.y2 - label_size.y; in slider_event_cb()
Dlv_example_slider_3.py15 label_size = lv.point_t()
16 lv.txt_get_size(label_size, label_text, lv.font_default(), 0, 0, lv.COORD.MAX, 0)
19 label_area.x1 = dsc.draw_area.x1 + dsc.draw_area.get_width() // 2 - label_size.x // 2
20 label_area.x2 = label_area.x1 + label_size.x
22 label_area.y1 = label_area.y2 - label_size.y
/lvgl-3.7.0/src/extra/widgets/meter/
Dlv_meter.c515 lv_point_t label_size; in draw_ticks_and_labels() local
516 … lv_txt_get_size(&label_size, part_draw_dsc.text, label_dsc_tmp.font, label_dsc_tmp.letter_space, in draw_ticks_and_labels()
521 label_cord.x1 = p.x - label_size.x / 2; in draw_ticks_and_labels()
522 label_cord.y1 = p.y - label_size.y / 2; in draw_ticks_and_labels()
523 label_cord.x2 = label_cord.x1 + label_size.x; in draw_ticks_and_labels()
524 label_cord.y2 = label_cord.y1 + label_size.y; in draw_ticks_and_labels()