Home
last modified time | relevance | path

Searched refs:scale (Results 1 – 25 of 79) sorted by relevance

1234

/lvgl-latest/tests/src/test_cases/widgets/
Dtest_scale.c21 lv_obj_t * scale = lv_scale_create(lv_screen_active()); in test_scale_render_example_1() local
22 lv_obj_set_size(scale, lv_pct(80), 100); in test_scale_render_example_1()
23 lv_scale_set_mode(scale, LV_SCALE_MODE_HORIZONTAL_BOTTOM); in test_scale_render_example_1()
24 lv_obj_center(scale); in test_scale_render_example_1()
26 lv_scale_set_label_show(scale, true); in test_scale_render_example_1()
28 lv_scale_set_total_tick_count(scale, 31); in test_scale_render_example_1()
29 lv_scale_set_major_tick_every(scale, 5); in test_scale_render_example_1()
31 lv_obj_set_style_length(scale, 5, LV_PART_ITEMS); in test_scale_render_example_1()
32 lv_obj_set_style_length(scale, 10, LV_PART_INDICATOR); in test_scale_render_example_1()
33 lv_scale_set_range(scale, 10, 40); in test_scale_render_example_1()
[all …]
/lvgl-latest/examples/widgets/scale/
Dlv_example_scale_9.c9 lv_obj_t * scale = lv_scale_create(lv_screen_active()); in lv_example_scale_9() local
10 lv_obj_set_size(scale, 200, 100); in lv_example_scale_9()
11 lv_scale_set_mode(scale, LV_SCALE_MODE_HORIZONTAL_BOTTOM); in lv_example_scale_9()
12 lv_obj_center(scale); in lv_example_scale_9()
14 lv_scale_set_label_show(scale, true); in lv_example_scale_9()
15 lv_obj_set_style_transform_rotation(scale, 450, LV_PART_INDICATOR); in lv_example_scale_9()
16 lv_obj_set_style_length(scale, 30, LV_PART_INDICATOR); in lv_example_scale_9()
17 lv_obj_set_style_translate_x(scale, 5, LV_PART_INDICATOR); in lv_example_scale_9()
19 lv_scale_set_total_tick_count(scale, 31); in lv_example_scale_9()
20 lv_scale_set_major_tick_every(scale, 5); in lv_example_scale_9()
[all …]
Dlv_example_scale_6.c10 static lv_obj_t * scale; variable
37 lv_scale_set_line_needle_value(scale, minute_hand, 60, minute); in timer_cb()
48 lv_scale_set_line_needle_value(scale, hour_hand, 40, hour * 5 + (minute / 12)); in timer_cb()
56 scale = lv_scale_create(lv_screen_active()); in lv_example_scale_6()
58 lv_obj_set_size(scale, 150, 150); in lv_example_scale_6()
59 lv_scale_set_mode(scale, LV_SCALE_MODE_ROUND_INNER); in lv_example_scale_6()
60 lv_obj_set_style_bg_opa(scale, LV_OPA_60, 0); in lv_example_scale_6()
61 lv_obj_set_style_bg_color(scale, lv_color_black(), 0); in lv_example_scale_6()
62 lv_obj_set_style_radius(scale, LV_RADIUS_CIRCLE, 0); in lv_example_scale_6()
63 lv_obj_set_style_clip_corner(scale, true, 0); in lv_example_scale_6()
[all …]
Dindex.rst1 A simple horizontal scale
4 .. lv_example:: widgets/scale/lv_example_scale_1
7 An vertical scale with section and custom styling
10 .. lv_example:: widgets/scale/lv_example_scale_2
13 A simple round scale
16 .. lv_example:: widgets/scale/lv_example_scale_3
19 A round scale with section and custom styling
22 .. lv_example:: widgets/scale/lv_example_scale_4
25 A scale with section and custom styling
28 .. lv_example:: widgets/scale/lv_example_scale_5
[all …]
Dlv_example_scale_2.c9 lv_obj_t * scale = lv_scale_create(lv_screen_active()); in lv_example_scale_2() local
10 lv_obj_set_size(scale, 60, 200); in lv_example_scale_2()
11 lv_scale_set_label_show(scale, true); in lv_example_scale_2()
12 lv_scale_set_mode(scale, LV_SCALE_MODE_VERTICAL_RIGHT); in lv_example_scale_2()
13 lv_obj_center(scale); in lv_example_scale_2()
15 lv_scale_set_total_tick_count(scale, 21); in lv_example_scale_2()
16 lv_scale_set_major_tick_every(scale, 5); in lv_example_scale_2()
18 lv_obj_set_style_length(scale, 10, LV_PART_INDICATOR); in lv_example_scale_2()
19 lv_obj_set_style_length(scale, 5, LV_PART_ITEMS); in lv_example_scale_2()
20 lv_scale_set_range(scale, 0, 100); in lv_example_scale_2()
[all …]
Dlv_example_scale_1.c9 lv_obj_t * scale = lv_scale_create(lv_screen_active()); in lv_example_scale_1() local
10 lv_obj_set_size(scale, lv_pct(80), 100); in lv_example_scale_1()
11 lv_scale_set_mode(scale, LV_SCALE_MODE_HORIZONTAL_BOTTOM); in lv_example_scale_1()
12 lv_obj_center(scale); in lv_example_scale_1()
14 lv_scale_set_label_show(scale, true); in lv_example_scale_1()
16 lv_scale_set_total_tick_count(scale, 31); in lv_example_scale_1()
17 lv_scale_set_major_tick_every(scale, 5); in lv_example_scale_1()
19 lv_obj_set_style_length(scale, 5, LV_PART_ITEMS); in lv_example_scale_1()
20 lv_obj_set_style_length(scale, 10, LV_PART_INDICATOR); in lv_example_scale_1()
21 lv_scale_set_range(scale, 10, 40); in lv_example_scale_1()
Dlv_example_scale_4.c9 lv_obj_t * scale = lv_scale_create(lv_screen_active()); in lv_example_scale_4() local
10 lv_obj_set_size(scale, 150, 150); in lv_example_scale_4()
11 lv_scale_set_label_show(scale, true); in lv_example_scale_4()
12 lv_scale_set_mode(scale, LV_SCALE_MODE_ROUND_OUTER); in lv_example_scale_4()
13 lv_obj_center(scale); in lv_example_scale_4()
15 lv_scale_set_total_tick_count(scale, 21); in lv_example_scale_4()
16 lv_scale_set_major_tick_every(scale, 5); in lv_example_scale_4()
18 lv_obj_set_style_length(scale, 5, LV_PART_ITEMS); in lv_example_scale_4()
19 lv_obj_set_style_length(scale, 10, LV_PART_INDICATOR); in lv_example_scale_4()
20 lv_scale_set_range(scale, 0, 100); in lv_example_scale_4()
[all …]
Dlv_example_scale_5.c9 lv_obj_t * scale = lv_scale_create(lv_screen_active()); in lv_example_scale_5() local
10 …lv_obj_set_size(scale, lv_display_get_horizontal_resolution(NULL) / 2, lv_display_get_vertical_res… in lv_example_scale_5()
11 lv_scale_set_label_show(scale, true); in lv_example_scale_5()
13 lv_scale_set_total_tick_count(scale, 10); in lv_example_scale_5()
14 lv_scale_set_major_tick_every(scale, 5); in lv_example_scale_5()
16 lv_obj_set_style_length(scale, 5, LV_PART_ITEMS); in lv_example_scale_5()
17 lv_obj_set_style_length(scale, 10, LV_PART_INDICATOR); in lv_example_scale_5()
18 lv_scale_set_range(scale, 25, 35); in lv_example_scale_5()
21 lv_scale_set_text_src(scale, custom_labels); in lv_example_scale_5()
32 lv_obj_add_style(scale, &indicator_style, LV_PART_INDICATOR); in lv_example_scale_5()
[all …]
Dlv_example_scale_7.c54 lv_obj_t * scale = lv_scale_create(lv_screen_active()); in lv_example_scale_7() local
55 lv_obj_set_size(scale, lv_pct(80), 100); in lv_example_scale_7()
56 lv_scale_set_mode(scale, LV_SCALE_MODE_HORIZONTAL_BOTTOM); in lv_example_scale_7()
57 lv_obj_center(scale); in lv_example_scale_7()
59 lv_scale_set_label_show(scale, true); in lv_example_scale_7()
61 lv_scale_set_total_tick_count(scale, 31); in lv_example_scale_7()
62 lv_scale_set_major_tick_every(scale, 5); in lv_example_scale_7()
64 lv_obj_set_style_length(scale, 5, LV_PART_ITEMS); in lv_example_scale_7()
65 lv_obj_set_style_length(scale, 10, LV_PART_INDICATOR); in lv_example_scale_7()
66 lv_scale_set_range(scale, 10, 40); in lv_example_scale_7()
[all …]
/lvgl-latest/src/widgets/scale/
Dlv_scale.c115 lv_scale_t * scale = (lv_scale_t *)obj; in lv_scale_set_mode() local
117 scale->mode = mode; in lv_scale_set_mode()
125 lv_scale_t * scale = (lv_scale_t *)obj; in lv_scale_set_total_tick_count() local
127 scale->total_tick_count = total_tick_count; in lv_scale_set_total_tick_count()
135 lv_scale_t * scale = (lv_scale_t *)obj; in lv_scale_set_major_tick_every() local
137 scale->major_tick_every = major_tick_every; in lv_scale_set_major_tick_every()
145 lv_scale_t * scale = (lv_scale_t *)obj; in lv_scale_set_label_show() local
147 scale->label_enabled = show_label; in lv_scale_set_label_show()
155 lv_scale_t * scale = (lv_scale_t *)obj; in lv_scale_set_range() local
157 scale->range_min = min; in lv_scale_set_range()
[all …]
/lvgl-latest/src/libs/thorvg/
DtvgText.h120 auto scale = 1.0f / loader->scale; in update() local
122 P(static_cast<LinearGradient*>(fill))->x1 *= scale; in update()
123 P(static_cast<LinearGradient*>(fill))->y1 *= scale; in update()
124 P(static_cast<LinearGradient*>(fill))->x2 *= scale; in update()
125 P(static_cast<LinearGradient*>(fill))->y2 *= scale; in update()
127 P(static_cast<RadialGradient*>(fill))->cx *= scale; in update()
128 P(static_cast<RadialGradient*>(fill))->cy *= scale; in update()
129 P(static_cast<RadialGradient*>(fill))->r *= scale; in update()
130 P(static_cast<RadialGradient*>(fill))->fx *= scale; in update()
131 P(static_cast<RadialGradient*>(fill))->fy *= scale; in update()
[all …]
DtvgStr.cpp186 auto scale = 1.0f; in strToFloat() local
189 scale *= 1E8; in strToFloat()
193 scale *= 10.0f; in strToFloat()
196 val = (minus_e == -1) ? (val / scale) : (val * scale); in strToFloat()
DtvgPaint.h61 float scale; //scale factor member
74 tvg::scale(&m, scale, scale); in update()
172 bool scale(float factor);
/lvgl-latest/src/libs/barcode/
Dlv_barcode.c79 void lv_barcode_set_scale(lv_obj_t * obj, uint16_t scale) in lv_barcode_set_scale() argument
83 if(scale == 0) { in lv_barcode_set_scale()
84 scale = 1; in lv_barcode_set_scale()
88 barcode->scale = scale; in lv_barcode_set_scale()
134 LV_ASSERT(barcode->scale > 0); in lv_barcode_update()
135 uint16_t scale = barcode->scale; in lv_barcode_update() local
141 buf_w = (barcode->direction == LV_DIR_HOR) ? barcode_w * scale : 1; in lv_barcode_update()
142 buf_h = (barcode->direction == LV_DIR_VER) ? barcode_w * scale : 1; in lv_barcode_update()
146 buf_w = (barcode->direction == LV_DIR_HOR) ? barcode_w * scale : lv_obj_get_width(obj); in lv_barcode_update()
147 buf_h = (barcode->direction == LV_DIR_VER) ? barcode_w * scale : lv_obj_get_height(obj); in lv_barcode_update()
[all …]
/lvgl-latest/examples/others/gestures/
Dlv_example_gestures.c116 float scale; in label_scale() local
118 scale = lv_event_get_pinch_scale(gesture_event); in label_scale()
128 LV_LOG_USER("label end scale: %g, state: %d", scale, state); in label_scale()
141 LV_LOG_USER("label start scale: %g", scale); in label_scale()
148 if(scale < 0.4) { in label_scale()
152 label_width = initial_w * scale; in label_scale()
153 label_height = initial_h * scale; in label_scale()
158 scale, label_x, label_y, label_width, label_height); in label_scale()
/lvgl-latest/src/libs/qrcode/
Dlv_qrcode.c117 int32_t scale = draw_buf->header.w / qr_size; in lv_qrcode_update() local
118 if(scale <= 0) return LV_RESULT_INVALID; in lv_qrcode_update()
122 if(qrcodegen_version2size(i) * scale > draw_buf->header.w) in lv_qrcode_update()
151 scale = obj_w / qr_size; in lv_qrcode_update()
152 int scaled = qr_size * scale; in lv_qrcode_update()
162 for(y = margin; y < scaled + margin; y += scale) { in lv_qrcode_update()
168 bool a = qrcodegen_getModule(qr0, (x - margin) / scale, (y - margin) / scale); in lv_qrcode_update()
201 for(s = 1; s < scale; s++) { in lv_qrcode_update()
/lvgl-latest/src/indev/
Dlv_indev_gesture.c124 return recognizer->scale; in lv_event_get_pinch_scale()
259 if(r->info->scale > LV_GESTURE_PINCH_MAX_INITIAL_SCALE && in lv_indev_gesture_detect_pinch()
267 if(r->info->scale > r->config->pinch_up_threshold || in lv_indev_gesture_detect_pinch()
268 r->info->scale < r->config->pinch_down_threshold) { in lv_indev_gesture_detect_pinch()
270 if(r->info->scale > 1.0f) { in lv_indev_gesture_detect_pinch()
271 r->scale = r->info->scale - (r->config->pinch_up_threshold - 1.0f); in lv_indev_gesture_detect_pinch()
274 else if(r->info->scale < 1.0f) { in lv_indev_gesture_detect_pinch()
276 r->scale = r->info->scale + (1.0f - r->config->pinch_down_threshold); in lv_indev_gesture_detect_pinch()
358 recognizer->scale = info->scale = 1; in reset_recognizer()
376 info->scale = 1; in init_gesture_info()
[all …]
/lvgl-latest/docs/details/widgets/
Dscale.rst28 .. image:: /misc/scale.png
41 :cpp:enumerator:`LV_SCALE_MODE_HORIZONTAL_BOTTOM`. This makes the scale horizontal
43 or tick position, use :cpp:expr:`lv_scale_set_mode(scale, mode)`, where ``mode`` can
60 - :cpp:expr:`lv_scale_set_range(scale, min, max)`, and
61 - :cpp:expr:`lv_scale_set_angle_range(scale, angle_range)`
74 :cpp:expr:`lv_scale_set_draw_ticks_on_top(scale, true)`. (This effect can be
91 - :cpp:expr:`lv_scale_set_total_tick_count(scale, total_tick_count)`, and
92 - :cpp:expr:`lv_scale_set_major_tick_every(scale, nth_tick)`.
95 :cpp:expr:`lv_scale_set_label_show(scale, true)`. (Pass ``false`` to hide them again.)
97 By default, the labels shown are the numeric values of the scale at the major tick
[all …]
/lvgl-latest/tests/src/test_cases/libs/
Dtest_barcode.c30 uint16_t scale = 2; in test_barcode_normal() local
35 lv_barcode_set_scale(barcode, scale); in test_barcode_normal()
39 TEST_ASSERT_EQUAL(lv_barcode_get_scale(barcode), scale); in test_barcode_normal()
/lvgl-latest/src/libs/tiny_ttf/
Dlv_tiny_ttf.c63 float scale; member
130 dsc->scale = stbtt_ScaleForMappingEmToPixels(&dsc->info, font_size); in lv_tiny_ttf_set_size()
133 font->line_height = (int32_t)(dsc->scale * (dsc->ascent - dsc->descent + line_gap)); in lv_tiny_ttf_set_size()
134 font->base_line = (int32_t)(dsc->scale * (line_gap - dsc->descent)); in lv_tiny_ttf_set_size()
244 dsc_out->adv_w = (uint16_t)floor((((float)adv_w + (float)k) * dsc->scale) + in ttf_get_glyph_dsc_cb()
280 dsc_out->adv_w = (uint16_t)floor((((float)adv_w + (float)k) * dsc->scale) + in ttf_get_glyph_dsc_cb()
463 stbtt_GetGlyphBitmapBox(&dsc->info, g1, dsc->scale, dsc->scale, &x1, &y1, &x2, &y2); in tiny_ttf_glyph_cache_create_cb()
469 dsc_out->adv_w = (uint16_t)floor((((float)advw + (float)k) * dsc->scale) + in tiny_ttf_glyph_cache_create_cb()
473 dsc_out->adv_w = (uint16_t)floor(((float)advw * dsc->scale) + in tiny_ttf_glyph_cache_create_cb()
517 stbtt_GetGlyphBitmapBox(info, g1, dsc->scale, dsc->scale, &x1, &y1, &x2, &y2); in tiny_ttf_draw_data_cache_create_cb()
[all …]
/lvgl-latest/src/core/
Dlv_obj_style.h292 int32_t scale = lv_obj_get_style_transform_scale_x(obj, part); in lv_obj_get_style_transform_scale_x_safe() local
293 return scale > 0 ? scale : 1; in lv_obj_get_style_transform_scale_x_safe()
298 int32_t scale = lv_obj_get_style_transform_scale_y(obj, part); in lv_obj_get_style_transform_scale_y_safe() local
299 return scale > 0 ? scale : 1; in lv_obj_get_style_transform_scale_y_safe()
/lvgl-latest/demos/high_res/
Dlv_demo_high_res_app_thermostat.c511 lv_obj_t * scale = lv_scale_create(scale_and_arc_box); in create_widget3() local
512 lv_obj_set_align(scale, LV_ALIGN_TOP_MID); in create_widget3()
513 lv_scale_set_mode(scale, LV_SCALE_MODE_ROUND_OUTER); in create_widget3()
514 lv_obj_set_size(scale, c->sz->card_long_edge, c->sz->card_long_edge); in create_widget3()
515 lv_obj_set_style_arc_opa(scale, LV_OPA_TRANSP, 0); in create_widget3()
516 lv_obj_set_style_radial_offset(scale, 12, LV_PART_ITEMS); in create_widget3()
517 lv_obj_set_style_line_rounded(scale, true, LV_PART_ITEMS); in create_widget3()
518 lv_obj_set_style_line_color(scale, lv_color_white(), LV_PART_ITEMS); in create_widget3()
519 lv_obj_set_style_line_width(scale, 4, LV_PART_ITEMS); in create_widget3()
520 lv_obj_set_style_length(scale, 1, LV_PART_ITEMS); in create_widget3()
[all …]
/lvgl-latest/tests/src/test_cases/draw/
Dtest_layer_transform.c29 int32_t scale[] = {256 * 4, 412, 569, 288, 711}; in test_no_residual_border_on_scale_down() local
35 lv_obj_set_style_transform_scale(obj, scale[i], 0); in test_no_residual_border_on_scale_down()
Dtest_draw_layer.c19 lv_obj_t * test_obj_create(const void * mask_src, int32_t scale, int32_t angle) in test_obj_create() argument
25 lv_obj_set_style_transform_scale(obj, scale, 0); in test_obj_create()
/lvgl-latest/src/libs/svg/
Dlv_svg_render.c1428 float scale = 1.0f; in _render_image() local
1431 scale = MAX(scale_x, scale_y); in _render_image()
1434 scale = MIN(scale_x, scale_y); in _render_image()
1444 lv_matrix_scale(&mtx, scale, scale); in _render_image()
1447 float tx = (image->width - img_w * scale) / 2; in _render_image()
1449 lv_matrix_scale(&mtx, scale, scale); in _render_image()
1453 float tx = image->width - img_w * scale; in _render_image()
1455 lv_matrix_scale(&mtx, scale, scale); in _render_image()
1459 float ty = (image->height - img_h * scale) / 2; in _render_image()
1461 lv_matrix_scale(&mtx, scale, scale); in _render_image()
[all …]

1234