Skip to content

Commit 936855c

Browse files
authored
Merge pull request #12795 from anntzer/cairo-degree-elevation
Fix Bezier degree elevation formula in backend_cairo.
2 parents 384bc0c + 704c12b commit 936855c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/backends/backend_cairo.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def _append_paths_slow(ctx, paths, transforms, clip=None):
9797
elif code == Path.LINETO:
9898
ctx.line_to(*points)
9999
elif code == Path.CURVE3:
100-
cur = ctx.get_current_point()
101-
ctx.curve_to(
102-
*np.concatenate([cur / 3 + points[:2] * 2 / 3,
103-
points[:2] * 2 / 3 + points[-2:] / 3]))
100+
cur = np.asarray(ctx.get_current_point())
101+
a = points[:2]
102+
b = points[-2:]
103+
ctx.curve_to(*(cur / 3 + a * 2 / 3), *(a * 2 / 3 + b / 3), *b)
104104
elif code == Path.CURVE4:
105105
ctx.curve_to(*points)
106106

0 commit comments

Comments
 (0)