Skip to content

Commit 8d15940

Browse files
committed
Squashed three commits into one.
1 parent 13a11b4 commit 8d15940

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
@@ -157,24 +157,15 @@ def draw_image(self, gc, x, y, im):
157157
# bbox - not currently used
158158
if _debug: print '%s.%s()' % (self.__class__.__name__, _fn_name())
159159

160-
clippath, clippath_trans = gc.get_clip_path()
161-
162160
im.flipud_out()
163161

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

179170
im.flipud_out()
180171

0 commit comments

Comments
 (0)