diff --git a/src/drawing.c b/src/drawing.c index f6a4c27..b1d92b5 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -675,8 +675,10 @@ static void strokeAddCorner( if (cl > 3) cl = 3; strokeAddPoint(stroke, x0, y0, nx*cl, ny*cl); } else { - // flat + // half circle strokeAddPoint(stroke, x0, y0, ny0, -nx0); + strokeAddCornerSub(stroke, nx0, ny0, precisionSqr, 8); + strokeAddCornerSub(stroke, ny1, -nx1, precisionSqr, 8); } } @@ -687,7 +689,7 @@ static void strokeDraw(HeliStroke *stroke, double w, double *color, int antialia double c1[4] = { color[0], color[1], color[2], color[3] }; double w0 = w + 0.5*aaBorder; double w1 = w - 0.5*aaBorder; - if (w1 < HELI_PRECISION) { + if (!(w1 > HELI_PRECISION)) { c1[3] *= w0/aaBorder; w1 = 0; } @@ -732,8 +734,8 @@ static void strokeDraw(HeliStroke *stroke, double w, double *color, int antialia static void drawStroke(int close) { HeliDrawingState *s = heliDrawingGetState(); - if (s->strokeColor[3] <= HELI_PRECISION) return; - if (s->strokeWidth < HELI_PRECISION) return; + if (!(s->strokeColor[3] > HELI_PRECISION)) return; + if (!(s->strokeWidth > HELI_PRECISION)) return; if (pathSize < 4) return; HeliStroke stroke = {};