From 82b04158866bae42d13950db310542e1171fb36e Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 16 Jun 2019 20:42:07 +0200 Subject: [PATCH] Clip small linewidths in agg --- src/_backend_agg.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/_backend_agg.h b/src/_backend_agg.h index 55af1950773f..b8536258fa6b 100644 --- a/src/_backend_agg.h +++ b/src/_backend_agg.h @@ -406,6 +406,11 @@ RendererAgg::_draw_path(path_t &path, bool has_clippath, const facepair_t &face, double linewidth = points_to_pixels(gc.linewidth); if (!gc.isaa) { linewidth = (linewidth < 0.5) ? 0.5 : mpl_round(linewidth); + } else { + // Too small linewidths are forced to zero because they require a + // lot of computation and do not make sense even with antialiasing. + // Compare github #14498. + linewidth = (linewidth < 0.001) ? 0 : mpl_round(linewidth); } if (gc.dashes.size() == 0) { stroke_t stroke(path);