8000 Merge pull request #1538 from mdehoon/master · matplotlib/matplotlib@66de428 · GitHub
[go: up one dir, main page]

Skip to content

Commit 66de428

Browse files
committed
Merge pull request #1538 from mdehoon/master
Remove unnecessary clip from Cairo backend; squashed commit
2 parents d4fca39 + 8d15940 commit 66de428

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/matplotlib/backends/backend_cairo.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,24 +156,15 @@ def draw_image(self, gc, x, y, im):
156156
# bbox - not currently used
157157
if _debug: print('%s.%s()' % (self.__class__.__name__, _fn_name()))
158158

159-
clippath, clippath_trans = gc.get_clip_path()
160-
161159
im.flipud_out()
162160

163161
rows, cols, buf = im.color_conv (BYTE_FORMAT)
164162
surface = cairo.ImageSurface.create_for_data (
165163
buf, cairo.FORMAT_ARGB32, cols, rows, cols*4)
166-
# function does not pass a 'gc' so use renderer.ctx
167-
ctx = self.gc.ctx
168-
ctx.save()
169-
if clippath is not None:
170-
ctx.new_path()
171-
RendererCairo.convert_path(ctx, clippath, clippath_trans)
172-
ctx.clip()
164+
ctx = gc.ctx
173165
y = self.height - y - rows
174166
ctx.set_source_surface (surface, x, y)
175167
ctx.paint()
176-
ctx.restore()
177168

178169
im.flipud_out()
179170

0 commit comments

Comments
 (0)
0