You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
7 months ago
|
diff --git a/third_party/agg23/agg_math_stroke.h b/third_party/agg23/agg_math_stroke.h
|
||
|
index 6d7ba8a..2b06b1b 100644
|
||
|
--- a/third_party/agg23/agg_math_stroke.h
|
||
|
+++ b/third_party/agg23/agg_math_stroke.h
|
||
|
@@ -60,28 +60,30 @@ void stroke_calc_arc(VertexConsumer& out_vertices,
|
||
|
}
|
||
|
da = acos(width / (width + ((1.0f / 8) / approximation_scale))) * 2;
|
||
|
out_vertices.add(coord_type(x + dx1, y + dy1));
|
||
|
- if(!ccw) {
|
||
|
- if(a1 > a2) {
|
||
|
- a2 += 2 * FX_PI;
|
||
|
+ if (da > 0) {
|
||
|
+ if (!ccw) {
|
||
|
+ if (a1 > a2) {
|
||
|
+ a2 += 2 * FX_PI;
|
||
|
}
|
||
|
a2 -= da / 4;
|
||
|
a1 += da;
|
||
|
- while(a1 < a2) {
|
||
|
+ while (a1 < a2) {
|
||
|
out_vertices.add(coord_type(x + (width * cos(a1)),
|
||
|
y + (width * sin(a1))));
|
||
|
- a1 += da;
|
||
|
+ a1 += da;
|
||
|
}
|
||
|
- } else {
|
||
|
- if(a1 < a2) {
|
||
|
- a2 -= 2 * FX_PI;
|
||
|
+ } else {
|
||
|
+ if (a1 < a2) {
|
||
|
+ a2 -= 2 * FX_PI;
|
||
|
}
|
||
|
a2 += da / 4;
|
||
|
a1 -= da;
|
||
|
- while(a1 > a2) {
|
||
|
+ while (a1 > a2) {
|
||
|
out_vertices.add(coord_type(x + (width * cos(a1)),
|
||
|
y + (width * sin(a1))));
|
||
|
- a1 -= da;
|
||
|
+ a1 -= da;
|
||
|
}
|
||
|
+ }
|
||
|
}
|
||
|
out_vertices.add(coord_type(x + dx2, y + dy2));
|
||
|
}
|