diff --git a/lib/matplotlib/backends/backend_cairo.py b/lib/matplotlib/backends/backend_cairo.py index 2b33bb23011d..15b2868db1f1 100644 --- a/lib/matplotlib/backends/backend_cairo.py +++ b/lib/matplotlib/backends/backend_cairo.py @@ -157,24 +157,15 @@ def draw_image(self, gc, x, y, im): # bbox - not currently used if _debug: print '%s.%s()' % (self.__class__.__name__, _fn_name()) - clippath, clippath_trans = gc.get_clip_path() - im.flipud_out() rows, cols, buf = im.color_conv (BYTE_FORMAT) surface = cairo.ImageSurface.create_for_data ( buf, cairo.FORMAT_ARGB32, cols, rows, cols*4) - # function does not pass a 'gc' so use renderer.ctx - ctx = self.gc.ctx - ctx.save() - if clippath is not None: - ctx.new_path() - RendererCairo.convert_path(ctx, clippath, clippath_trans) - ctx.clip() + ctx = gc.ctx y = self.height - y - rows ctx.set_source_surface (surface, x, y) ctx.paint() - ctx.restore() im.flipud_out()