This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository echart.

View the commit online.

commit 6185236120187be5a17f22c2dce0ea9c7df4d912
Author: Vincent Torri <[email protected]>
AuthorDate: Tue May 26 21:15:47 2026 +0200

    fix the display of a pie of angle > PI
---
 src/lib/echart_pie.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/lib/echart_pie.c b/src/lib/echart_pie.c
index f7ce9d4..cd07c8b 100644
--- a/src/lib/echart_pie.c
+++ b/src/lib/echart_pie.c
@@ -193,19 +193,24 @@ _pie_smart_calculate(Evas_Object *obj)
       evas_vg_shape_append_move_to(sd->data[i].pie, 0, 0);
       evas_vg_shape_append_line_to(sd->data[i].pie,
                                    rad * cos(theta0), -rad * sin(theta0));
-      if (theta1 < M_PI)
+
+      if (theta1 >= M_PI)
       {
          evas_vg_shape_append_arc_to(sd->data[i].pie,
-                                     rad * cos(theta0 + theta1), -rad * sin(theta0 + theta1),
+                                     rad * cos(theta0 + M_PI), -rad * sin(theta0 + M_PI),
                                      rad, rad,
                                      0, EINA_FALSE, EINA_FALSE);
-         evas_vg_shape_append_line_to(sd->data[i].pie, 0, 0);
-         evas_vg_shape_stroke_color_set(sd->data[i].pie, 0, 0, 0, 0);
-         evas_vg_node_color_set(sd->data[i].pie, sd->data[i].r, sd->data[i].g, sd->data[i].b, 255);
-      }
-      else
-      {
       }
+
+      evas_vg_shape_append_arc_to(sd->data[i].pie,
+                                  rad * cos(theta0 + theta1), -rad * sin(theta0 + theta1),
+                                  rad, rad,
+                                  0, EINA_FALSE, EINA_FALSE);
+      evas_vg_shape_append_line_to(sd->data[i].pie, 0, 0);
+
+      evas_vg_shape_stroke_color_set(sd->data[i].pie, 0, 0, 0, 0);
+      evas_vg_node_color_set(sd->data[i].pie,
+                             sd->data[i].r, sd->data[i].g, sd->data[i].b, 255);
       evas_vg_node_origin_set(sd->data[i].pie, w/2, h/2);
 
       theta0 += theta1;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to