Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b549d12

Browse filesBrowse files
committed
cairo: save a pair of ctx.save/ctx.restore.
The removed pair of ctx.save and ctx.restore was clearly unnecessary (the outer one is still there, and the font is reset at each loop iteration).
1 parent 3edc982 commit b549d12
Copy full SHA for b549d12

File tree

Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed

‎lib/matplotlib/backends/backend_cairo.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_cairo.py
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ def _draw_mathtext(self, gc, x, y, s, prop, angle):
299299
ctx.move_to(ox, oy)
300300

301301
fontProp = ttfFontProperty(font)
302-
ctx.save()
303302
ctx.select_font_face(fontProp.name,
304303
self.fontangles[fontProp.style],
305304
self.fontweights[fontProp.weight])
@@ -309,7 +308,6 @@ def _draw_mathtext(self, gc, x, y, s, prop, angle):
309308
if not six.PY3 and isinstance(s, six.text_type):
310309
s = s.encode("utf-8")
311310
ctx.show_text(s)
312-
ctx.restore()
313311

314312
for ox, oy, w, h in rects:
315313
ctx.new_path()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.