Lines Matching refs:scale

71     lv_meter_scale_t * scale = _lv_ll_ins_head(&meter->scale_ll);  in lv_meter_add_scale()  local
72 LV_ASSERT_MALLOC(scale); in lv_meter_add_scale()
73 lv_memset_00(scale, sizeof(lv_meter_scale_t)); in lv_meter_add_scale()
75 scale->angle_range = 270; in lv_meter_add_scale()
76 scale->rotation = 90 + (360 - scale->angle_range) / 2; in lv_meter_add_scale()
77 scale->min = 0; in lv_meter_add_scale()
78 scale->max = 100; in lv_meter_add_scale()
79 scale->tick_cnt = 6; in lv_meter_add_scale()
80 scale->tick_length = 8; in lv_meter_add_scale()
81 scale->tick_width = 2; in lv_meter_add_scale()
82 scale->label_gap = 2; in lv_meter_add_scale()
84 return scale; in lv_meter_add_scale()
87 void lv_meter_set_scale_ticks(lv_obj_t * obj, lv_meter_scale_t * scale, uint16_t cnt, uint16_t widt… in lv_meter_set_scale_ticks() argument
90 scale->tick_cnt = cnt; in lv_meter_set_scale_ticks()
91 scale->tick_width = width; in lv_meter_set_scale_ticks()
92 scale->tick_length = len; in lv_meter_set_scale_ticks()
93 scale->tick_color = color; in lv_meter_set_scale_ticks()
97 void lv_meter_set_scale_major_ticks(lv_obj_t * obj, lv_meter_scale_t * scale, uint16_t nth, uint16_… in lv_meter_set_scale_major_ticks() argument
100 scale->tick_major_nth = nth; in lv_meter_set_scale_major_ticks()
101 scale->tick_major_width = width; in lv_meter_set_scale_major_ticks()
102 scale->tick_major_length = len; in lv_meter_set_scale_major_ticks()
103 scale->tick_major_color = color; in lv_meter_set_scale_major_ticks()
104 scale->label_gap = label_gap; in lv_meter_set_scale_major_ticks()
108 void lv_meter_set_scale_range(lv_obj_t * obj, lv_meter_scale_t * scale, int32_t min, int32_t max, u… in lv_meter_set_scale_range() argument
111 scale->min = min; in lv_meter_set_scale_range()
112 scale->max = max; in lv_meter_set_scale_range()
113 scale->angle_range = angle_range; in lv_meter_set_scale_range()
114 scale->rotation = rotation; in lv_meter_set_scale_range()
122 lv_meter_indicator_t * lv_meter_add_needle_line(lv_obj_t * obj, lv_meter_scale_t * scale, uint16_t … in lv_meter_add_needle_line() argument
130 indic->scale = scale; in lv_meter_add_needle_line()
142 lv_meter_indicator_t * lv_meter_add_needle_img(lv_obj_t * obj, lv_meter_scale_t * scale, const void… in lv_meter_add_needle_img() argument
150 indic->scale = scale; in lv_meter_add_needle_img()
162 lv_meter_indicator_t * lv_meter_add_arc(lv_obj_t * obj, lv_meter_scale_t * scale, uint16_t width, l… in lv_meter_add_arc() argument
170 indic->scale = scale; in lv_meter_add_arc()
182 lv_meter_indicator_t * lv_meter_add_scale_lines(lv_obj_t * obj, lv_meter_scale_t * scale, lv_color_… in lv_meter_add_scale_lines() argument
190 indic->scale = scale; in lv_meter_add_scale_lines()
356 lv_meter_scale_t * scale = indic->scale; in draw_arcs() local
358 int32_t start_angle = lv_map(indic->start_value, scale->min, scale->max, scale->rotation, in draw_arcs()
359 scale->rotation + scale->angle_range); in draw_arcs()
360 int32_t end_angle = lv_map(indic->end_value, scale->min, scale->max, scale->rotation, in draw_arcs()
361 scale->rotation + scale->angle_range); in draw_arcs()
393 lv_meter_scale_t * scale; in draw_ticks_and_labels() local
406 _LV_LL_READ_BACK(&meter->scale_ll, scale) { in draw_ticks_and_labels()
407 part_draw_dsc.sub_part_ptr = scale; in draw_ticks_and_labels()
410 lv_coord_t r_in_minor = r_out - scale->tick_length; in draw_ticks_and_labels()
411 lv_coord_t r_in_major = r_out - scale->tick_major_length; in draw_ticks_and_labels()
437 uint32_t minor_cnt = scale->tick_major_nth ? scale->tick_major_nth - 1 : 0xFFFF; in draw_ticks_and_labels()
439 for(i = 0; i < scale->tick_cnt; i++) { in draw_ticks_and_labels()
442 if(minor_cnt == scale->tick_major_nth) { in draw_ticks_and_labels()
447 int32_t value_of_line = lv_map(i, 0, scale->tick_cnt - 1, scale->min, scale->max); in draw_ticks_and_labels()
450 lv_color_t line_color = major ? scale->tick_major_color : scale->tick_color; in draw_ticks_and_labels()
453 lv_coord_t line_width_ori = major ? scale->tick_major_width : scale->tick_width; in draw_ticks_and_labels()
471 … ratio = lv_map(value_of_line, scale->min, scale->max, LV_OPA_TRANSP, LV_OPA_COVER); in draw_ticks_and_labels()
478 …int32_t angle_upscale = ((i * scale->angle_range) * 10) / (scale->tick_cnt - 1) + + scale->rotati… in draw_ticks_and_labels()
498 uint32_t r_text = r_in_major - scale->label_gap; in draw_ticks_and_labels()
578 lv_meter_scale_t * scale = indic->scale; in draw_needles() local
582 …int32_t angle = lv_map(indic->end_value, scale->min, scale->max, scale->rotation, scale->rotation … in draw_needles()
583 lv_coord_t r_out = r_edge + scale->r_mod + indic->type_data.needle_line.r_mod; in draw_needles()
602 …int32_t angle = lv_map(indic->end_value, scale->min, scale->max, scale->rotation, scale->rotation … in draw_needles()
642 lv_meter_scale_t * scale = indic->scale; in inv_arc() local
644 …int32_t start_angle = lv_map(old_value, scale->min, scale->max, scale->rotation, scale->angle_rang… in inv_arc()
645 …int32_t end_angle = lv_map(new_value, scale->min, scale->max, scale->rotation, scale->angle_range … in inv_arc()
663 lv_meter_scale_t * scale = indic->scale; in inv_line() local
666 …int32_t angle = lv_map(value, scale->min, scale->max, scale->rotation, scale->rotation + scale->an… in inv_line()
667 r_out += scale->r_mod + indic->type_data.needle_line.r_mod; in inv_line()
681 …int32_t angle = lv_map(value, scale->min, scale->max, scale->rotation, scale->rotation + scale->an… in inv_line()