ref: d42a17033f6564e51d363982575dc9d0448400f1
parent: 6514654769ead0847c93bb9223227dab0baf9889
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Jul 16 14:35:30 EDT 2024
fix contour closing
--- a/rast.c
+++ b/rast.c
@@ -494,16 +494,14 @@
goto noplace;
*e = (Spt){p->x, p->y};
}
- if(e > pts && (e[-1].x != pts->x || e[-1].y != pts->y)){
- if(p[-1].onCurve){ /* close with a straight line */
- if(max-- < 1)
- goto noplace;
- *e++ = *pts;
- }
+ if(p[-1].onCurve){ /* close with a straight line */
if(max-- < 1)
goto noplace;
*e++ = *pts;
}
+ if(max-- < 1)
+ goto noplace;
+ *e++ = *pts;
for(; pts <= e-3; pts += 2, s++){
s->v0[0] = pts[0].x;