8000 Clip small linewidths in agg · matplotlib/matplotlib@ed7f647 · GitHub
[go: up one dir, main page]

Skip to content

Commit ed7f647

Browse files
committed
Clip small linewidths in agg
1 parent 6d6861b commit ed7f647

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/_backend_agg.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ RendererAgg::_draw_path(path_t &path, bool has_clippath, const facepair_t &face,
406406
double linewidth = points_to_pixels(gc.linewidth);
407407
if (!gc.isaa) {
408408
linewidth = (linewidth < 0.5) ? 0.5 : mpl_round(linewidth);
409+
} else {
410+
// Too small linewidths are clipped because they require a lot of
411+
// computation and do not make sense even with antialiasing.
412+
// Compare github #14498.
413+
linewidth = (linewidth < 0.01) ? 0.01 : mpl_round(linewidth);
409414
}
410415
if (gc.dashes.size() == 0) {
411416
stroke_t stroke(path);

0 commit comments

Comments
 (0)
0