/lvgl-3.5.0/src/misc/ |
D | lv_math.c | 48 LV_ATTRIBUTE_FAST_MEM int16_t lv_trigo_sin(int16_t angle) in lv_trigo_sin() argument 51 angle = angle % 360; in lv_trigo_sin() 53 if(angle < 0) angle = 360 + angle; in lv_trigo_sin() 55 if(angle < 90) { in lv_trigo_sin() 56 ret = sin0_90_table[angle]; in lv_trigo_sin() 58 else if(angle >= 90 && angle < 180) { in lv_trigo_sin() 59 angle = 180 - angle; in lv_trigo_sin() 60 ret = sin0_90_table[angle]; in lv_trigo_sin() 62 else if(angle >= 180 && angle < 270) { in lv_trigo_sin() 63 angle = angle - 180; in lv_trigo_sin() [all …]
|
D | lv_math.h | 47 LV_ATTRIBUTE_FAST_MEM int16_t lv_trigo_sin(int16_t angle); 49 static inline LV_ATTRIBUTE_FAST_MEM int16_t lv_trigo_cos(int16_t angle) in lv_trigo_cos() argument 51 return lv_trigo_sin(angle + 90); in lv_trigo_cos()
|
D | lv_area.c | 460 void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_point_t * pivot) in lv_point_transform() argument 462 if(angle == 0 && zoom == 256) { in lv_point_transform() 469 if(angle == 0) { in lv_point_transform() 478 if(angle_prev != angle) { in lv_point_transform() 479 int32_t angle_limited = angle; in lv_point_transform() 497 angle_prev = angle; in lv_point_transform()
|
/lvgl-3.5.0/src/widgets/ |
D | lv_arc.c | 342 uint16_t angle = get_angle(obj); in lv_arc_align_obj_to_angle() local 343 lv_coord_t knob_x = (arc_r * lv_trigo_sin(angle + 90)) >> LV_TRIGO_SHIFT; in lv_arc_align_obj_to_angle() 344 lv_coord_t knob_y = (arc_r * lv_trigo_sin(angle)) >> LV_TRIGO_SHIFT; in lv_arc_align_obj_to_angle() 367 uint16_t angle = get_angle(obj); in lv_arc_rotate_obj_to_angle() local 372 lv_obj_set_style_transform_angle(obj_to_rotate, angle * 10 + 900, 0); in lv_arc_rotate_obj_to_angle() 471 int16_t angle; in lv_arc_event() local 477 angle = lv_atan2(p.y, p.x); in lv_arc_event() 478 angle -= arc->rotation; in lv_arc_event() 479 angle -= arc->bg_angle_start; /*Make the angle relative to the start angle*/ in lv_arc_event() 481 if(angle < 0) angle += 360; in lv_arc_event() [all …]
|
D | lv_img.c | 158 if(img->angle || img->zoom != LV_IMG_ZOOM_NONE) lv_obj_refresh_ext_draw_size(obj); in lv_img_set_src() 183 void lv_img_set_angle(lv_obj_t * obj, int16_t angle) in lv_img_set_angle() argument 185 while(angle >= 3600) angle -= 3600; in lv_img_set_angle() 186 while(angle < 0) angle += 3600; in lv_img_set_angle() 189 if(angle == img->angle) return; in lv_img_set_angle() 195 _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot); in lv_img_set_angle() 202 img->angle = angle; in lv_img_set_angle() 211 _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot); in lv_img_set_angle() 228 _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot); in lv_img_set_pivot() 245 _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot); in lv_img_set_pivot() [all …]
|
D | lv_img.h | 46 uint16_t angle; /*rotation angle of the image*/ member 121 void lv_img_set_angle(lv_obj_t * obj, int16_t angle);
|
/lvgl-3.5.0/src/draw/nxp/vglite/ |
D | lv_draw_vglite_arc.c | 66 int32_t angle; /* angle <90deg */ member 90 static void rotate_point(int32_t angle, int32_t * x, int32_t * y); 240 dst->angle = src->angle; in copy_arc() 254 static void rotate_point(int32_t angle, int32_t * x, int32_t * y) in rotate_point() argument 258 int16_t alpha = (int16_t)angle; in rotate_point() 386 fullarc.angle = arc->angle; in get_subarc_control_points() 392 if(arc->angle == 90) { in get_subarc_control_points() 398 uint16_t t2 = TperDegree[arc->angle + span]; in get_subarc_control_points() 421 uint16_t t1 = TperDegree[arc->angle]; in get_subarc_control_points() 479 fullarc.angle = arc->angle; in get_arc_control_points() [all …]
|
/lvgl-3.5.0/src/extra/widgets/colorwheel/ |
D | lv_colorwheel.c | 48 static lv_color_t angle_to_mode_color_fast(lv_obj_t * obj, uint16_t angle); 471 int16_t angle = 0; in lv_colorwheel_event() local 501 angle = lv_atan2(p.x, p.y) % 360; in lv_colorwheel_event() 508 hsv_cur.h = angle; in lv_colorwheel_event() 511 hsv_cur.s = (angle * 100) / 360; in lv_colorwheel_event() 514 hsv_cur.v = (angle * 100) / 360; in lv_colorwheel_event() 558 uint16_t angle = get_angle(obj); in refr_knob_pos() local 559 colorwheel->knob.pos.x = (((int32_t)r * lv_trigo_sin(angle)) >> LV_TRIGO_SHIFT); in refr_knob_pos() 560 colorwheel->knob.pos.y = (((int32_t)r * lv_trigo_cos(angle)) >> LV_TRIGO_SHIFT); in refr_knob_pos() 648 static lv_color_t angle_to_mode_color_fast(lv_obj_t * obj, uint16_t angle) in angle_to_mode_color_fast() argument [all …]
|
/lvgl-3.5.0/examples/event/ |
D | lv_example_event_4.c | 40 int angle = i * 360 / n + ((tick % 36000) / 100); in event_cb() local 41 lv_coord_t x = 150 + (r * lv_trigo_cos(angle) >> LV_TRIGO_SHIFT), y = in event_cb() 42 150 + (r * lv_trigo_sin(angle) >> LV_TRIGO_SHIFT); in event_cb()
|
/lvgl-3.5.0/src/extra/widgets/meter/ |
D | lv_meter.c | 579 …int32_t angle = lv_map(indic->end_value, scale->min, scale->max, scale->rotation, scale->rotation … in draw_needles() local 582 p_end.y = (lv_trigo_sin(angle) * (r_out)) / LV_TRIGO_SIN_MAX + scale_center.y; in draw_needles() 583 p_end.x = (lv_trigo_cos(angle) * (r_out)) / LV_TRIGO_SIN_MAX + scale_center.x; in draw_needles() 599 …int32_t angle = lv_map(indic->end_value, scale->min, scale->max, scale->rotation, scale->rotation … in draw_needles() local 611 angle = angle * 10; in draw_needles() 612 if(angle > 3600) angle -= 3600; in draw_needles() 613 img_dsc.angle = angle; in draw_needles() 664 …int32_t angle = lv_map(value, scale->min, scale->max, scale->rotation, scale->rotation + scale->an… in inv_line() local 667 p_end.y = (lv_trigo_sin(angle) * (r_out)) / LV_TRIGO_SIN_MAX + scale_center.y; in inv_line() 668 p_end.x = (lv_trigo_cos(angle) * (r_out)) / LV_TRIGO_SIN_MAX + scale_center.x; in inv_line() [all …]
|
/lvgl-3.5.0/src/draw/ |
D | lv_img_buf.c | 423 void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, int16_t angle, u… in _lv_img_buf_get_transformed_area() argument 427 if(angle == 0 && zoom == LV_IMG_ZOOM_NONE) { in _lv_img_buf_get_transformed_area() 441 lv_point_transform(&p[0], angle, zoom, pivot); in _lv_img_buf_get_transformed_area() 442 lv_point_transform(&p[1], angle, zoom, pivot); in _lv_img_buf_get_transformed_area() 443 lv_point_transform(&p[2], angle, zoom, pivot); in _lv_img_buf_get_transformed_area() 444 lv_point_transform(&p[3], angle, zoom, pivot); in _lv_img_buf_get_transformed_area() 451 LV_UNUSED(angle); in _lv_img_buf_get_transformed_area()
|
D | lv_draw_img.h | 34 int16_t angle; member
|
D | lv_draw_img.c | 248 if(draw_dsc->angle || draw_dsc->zoom != LV_IMG_ZOOM_NONE) { in decode_and_draw() 265 if(draw_dsc->angle || draw_dsc->zoom != LV_IMG_ZOOM_NONE) { in decode_and_draw() 269 …_lv_img_buf_get_transformed_area(&map_area_rot, w, h, draw_dsc->angle, draw_dsc->zoom, &draw_dsc->… in decode_and_draw()
|
D | lv_img_buf.h | 238 void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, int16_t angle, u…
|
/lvgl-3.5.0/src/core/ |
D | lv_indev_scroll.c | 65 int16_t angle = 0; in _lv_indev_scroll_handler() local 69 angle += lv_obj_get_style_transform_angle(parent, 0); in _lv_indev_scroll_handler() 74 if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) { in _lv_indev_scroll_handler() 75 angle = -angle; in _lv_indev_scroll_handler() 78 lv_point_transform(&proc->types.pointer.vect, angle, zoom, &pivot); in _lv_indev_scroll_handler() 283 int16_t angle = 0; in find_scroll_obj() local 288 angle += lv_obj_get_style_transform_angle(parent, 0); in find_scroll_obj() 295 if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) { in find_scroll_obj() 296 angle = -angle; in find_scroll_obj() 298 lv_point_transform(&obj_scroll_sum, angle, zoom, &pivot); in find_scroll_obj()
|
D | lv_indev.c | 991 int16_t angle = 0; in indev_proc_release() local 996 angle += lv_obj_get_style_transform_angle(parent, 0); in indev_proc_release() 1001 if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) { in indev_proc_release() 1002 angle = -angle; in indev_proc_release() 1004 lv_point_transform(&proc->types.pointer.scroll_throw_vect, angle, zoom, &pivot); in indev_proc_release() 1005 lv_point_transform(&proc->types.pointer.scroll_throw_vect_ori, angle, zoom, &pivot); in indev_proc_release()
|
/lvgl-3.5.0/src/draw/nxp/pxp/ |
D | lv_draw_pxp.c | 200 bool has_rotation = (dsc->angle != 0); in lv_draw_pxp_img_decoded() 207 if(dsc->angle % 900) { in lv_draw_pxp_img_decoded() 208 … PXP_LOG_TRACE("Rotation angle %d is not supported. PXP can rotate only 90x angle.", dsc->angle); in lv_draw_pxp_img_decoded()
|
D | lv_draw_pxp_blend.h | 87 lv_opa_t opa, lv_disp_rot_t angle);
|
D | lv_draw_pxp_blend.c | 206 lv_opa_t opa, lv_disp_rot_t angle) in lv_gpu_nxp_pxp_blit() argument 217 switch(angle) { in lv_gpu_nxp_pxp_blit() 294 bool has_rotation = (dsc->angle != 0); in lv_gpu_nxp_pxp_blit_transform() 344 bool has_rotation = (dsc->angle != 0); in lv_pxp_blit_cover() 351 switch(dsc->angle) { in lv_pxp_blit_cover()
|
/lvgl-3.5.0/src/draw/sdl/ |
D | lv_draw_sdl_arc.c | 41 static void get_cap_area(int16_t angle, lv_coord_t thickness, uint16_t radius, const lv_point_t * c… 198 static void get_cap_area(int16_t angle, lv_coord_t thickness, uint16_t radius, const lv_point_t * c… in get_cap_area() argument 210 cir_x = ((radius - thick_half) * lv_trigo_sin((int16_t)(90 - angle))) >> (LV_TRIGO_SHIFT - ps); in get_cap_area() 211 cir_y = ((radius - thick_half) * lv_trigo_sin(angle)) >> (LV_TRIGO_SHIFT - ps); in get_cap_area()
|
D | lv_draw_sdl_line.c | 66 double angle = SDL_atan2(y2 - y1, x2 - x1) * 180 / M_PI; in lv_draw_sdl_draw_line() local 97 if(!SDL_RectEquals(&clip_rect, &dstrect) || angle != 0) { in lv_draw_sdl_draw_line() 100 SDL_RenderCopyEx(renderer, texture, &srcrect, &dstrect, angle, ¢er, 0); in lv_draw_sdl_draw_line()
|
D | lv_draw_sdl_layer.c | 113 draw_dsc->angle, ¢er, SDL_FLIP_NONE); in lv_draw_sdl_layer_blend()
|
/lvgl-3.5.0/docs/widgets/core/ |
D | arc.md | 22 … end angle of the background arc use the `lv_arc_set_bg_angles(arc, start_angle, end_angle)` funct… 38 The mode can be set by `lv_arc_set_mode(arc, LV_ARC_MODE_...)` and used only if the angle is set by… 49 In other words, the angle and value settings are independent. You should exclusively use one or the… 64 …ed according to the current position of the arc in order to follow the arc's current value (angle).
|
/lvgl-3.5.0/src/draw/sw/ |
D | lv_draw_sw_transform.c | 30 int32_t angle; member 87 tr_dsc.angle = -draw_dsc->angle; in lv_draw_sw_transform() 91 int32_t angle_low = tr_dsc.angle / 10; in lv_draw_sw_transform() 93 int32_t angle_rem = tr_dsc.angle - (angle_low * 10); in lv_draw_sw_transform() 472 if(t->angle == 0 && t->zoom == LV_IMG_ZOOM_NONE) { in transform_point_upscaled() 481 if(t->angle == 0) { in transform_point_upscaled()
|
D | lv_draw_sw_img.c | 53 bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_IMG_ZOOM_NONE ? true : false; in lv_draw_sw_img_decoded() 132 lv_draw_mask_res_t mask_res_def = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle || in lv_draw_sw_img_decoded()
|