• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/third_party/agg23/agg_math_stroke.h b/third_party/agg23/agg_math_stroke.h
2index 6d7ba8a..2b06b1b 100644
3--- a/third_party/agg23/agg_math_stroke.h
4+++ b/third_party/agg23/agg_math_stroke.h
5@@ -60,28 +60,30 @@ void stroke_calc_arc(VertexConsumer& out_vertices,
6     }
7     da = FXSYS_acos(width / (width + ((1.0f / 8) / approximation_scale))) * 2;
8     out_vertices.add(coord_type(x + dx1, y + dy1));
9-    if(!ccw) {
10-        if(a1 > a2) {
11-            a2 += 2 * FX_PI;
12+    if (da > 0) {
13+      if (!ccw) {
14+        if (a1 > a2) {
15+          a2 += 2 * FX_PI;
16         }
17         a2 -= da / 4;
18         a1 += da;
19-        while(a1 < a2) {
20+        while (a1 < a2) {
21           out_vertices.add(coord_type(x + (width * FXSYS_cos(a1)),
22                                       y + (width * FXSYS_sin(a1))));
23-            a1 += da;
24+          a1 += da;
25         }
26-    } else {
27-        if(a1 < a2) {
28-            a2 -= 2 * FX_PI;
29+      } else {
30+        if (a1 < a2) {
31+          a2 -= 2 * FX_PI;
32         }
33         a2 += da / 4;
34         a1 -= da;
35-        while(a1 > a2) {
36+        while (a1 > a2) {
37           out_vertices.add(coord_type(x + (width * FXSYS_cos(a1)),
38                                       y + (width * FXSYS_sin(a1))));
39-            a1 -= da;
40+          a1 -= da;
41         }
42+      }
43     }
44     out_vertices.add(coord_type(x + dx2, y + dy2));
45 }
46