fix(vg_lite): remove redundant MOVE_TO operations (#5713)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -114,6 +114,8 @@ void lv_draw_vg_lite_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * d
|
|||||||
float end_x = radius_in * MATH_COSF(end_angle_rad) + cx;
|
float end_x = radius_in * MATH_COSF(end_angle_rad) + cx;
|
||||||
float end_y = radius_in * MATH_SINF(end_angle_rad) + cy;
|
float end_y = radius_in * MATH_SINF(end_angle_rad) + cy;
|
||||||
|
|
||||||
|
lv_vg_lite_path_move_to(path, start_x, start_y);
|
||||||
|
|
||||||
/* radius_out arc */
|
/* radius_out arc */
|
||||||
lv_vg_lite_path_append_arc(path,
|
lv_vg_lite_path_append_arc(path,
|
||||||
cx, cy,
|
cx, cy,
|
||||||
@@ -134,7 +136,6 @@ void lv_draw_vg_lite_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * d
|
|||||||
false);
|
false);
|
||||||
|
|
||||||
/* close arc */
|
/* close arc */
|
||||||
lv_vg_lite_path_line_to(path, start_x, start_y);
|
|
||||||
lv_vg_lite_path_close(path);
|
lv_vg_lite_path_close(path);
|
||||||
|
|
||||||
/* draw round */
|
/* draw round */
|
||||||
|
|||||||
@@ -445,9 +445,6 @@ void lv_vg_lite_path_append_arc(lv_vg_lite_path_t * path,
|
|||||||
lv_vg_lite_path_move_to(path, cx, cy);
|
lv_vg_lite_path_move_to(path, cx, cy);
|
||||||
lv_vg_lite_path_line_to(path, start_x + cx, start_y + cy);
|
lv_vg_lite_path_line_to(path, start_x + cx, start_y + cy);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
lv_vg_lite_path_move_to(path, start_x + cx, start_y + cy);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i = 0; i < n_curves; ++i) {
|
for(int i = 0; i < n_curves; ++i) {
|
||||||
float end_angle = start_angle + ((i != n_curves - 1) ? MATH_HALF_PI * sweep_sign : fract);
|
float end_angle = start_angle + ((i != n_curves - 1) ? MATH_HALF_PI * sweep_sign : fract);
|
||||||
|
|||||||
Reference in New Issue
Block a user