Skip to content

Commit 7f57d65

Browse files
authored
Merge pull request #12838 from meeseeksmachine/auto-backport-of-pr-12795-on-v3.0.x
Backport PR #12795 on branch v3.0.x (Fix Bezier degree elevation formula in backend_cairo.)
2 parents 747916d + 0a10716 commit 7f57d65

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
@@ -99,10 +99,10 @@ def _append_paths_slow(ctx, paths, transforms, clip=None):
9999
elif code == Path.LINETO:
100100
ctx.line_to(*points)
101101
elif code == Path.CURVE3:
102-
cur = ctx.get_current_point()
103-
ctx.curve_to(
104-
*np.concatenate([cur / 3 + points[:2] * 2 / 3,
105-
points[:2] * 2 / 3 + points[-2:] / 3]))
102+
cur = np.asarray(ctx.get_current_point())
103+
a = points[:2]
104+
b = points[-2:]
105+
ctx.curve_to(*(cur / 3 + a * 2 / 3), *(a * 2 / 3 + b / 3), *b)
106106
elif code == Path.CURVE4:
107107
ctx.curve_to(*points)
108108

0 commit comments

Comments
 (0)