8000 Simplify hatching. · matplotlib/mplcairo@ad26e0e · GitHub
[go: up one dir, main page]

Skip to content

Commit ad26e0e

Browse files
committed
Simplify hatching.
1 parent db0688f commit ad26e0e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/_mplcairo.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,13 +1023,12 @@ void GraphicsContextRenderer::draw_path(
10231023
fill_and_stroke_exact(
10241024
hatch_cr, *hatch_path, &mtx, hatch_color, hatch_color);
10251025
auto const& hatch_pattern =
1026-
cairo_pattern_create_for_surface(cairo_get_target(hatch_cr));
1026+
cairo_pattern_create_for_surface(hatch_surface);
10271027
cairo_pattern_set_extend(hatch_pattern, CAIRO_EXTEND_REPEAT);
10281028
cairo_set_source(cr_, hatch_pattern);
10291029
cairo_pattern_destroy(hatch_pattern);
10301030
load_path();
1031-
cairo_clip_preserve(cr_);
1032-
cairo_paint(cr_);
1031+
cairo_fill_preserve(cr_);
10331032
cairo_restore(cr_);
10341033
}
10351034
auto const& chunksize = rc_param("agg.path.chunksize").cast<int>();

0 commit comments

Comments
 (0)
0