| 203 | ctx, rgbFace, gc.get_alpha(), gc.get_forced_alpha()) |
| 204 | |
| 205 | def draw_image(self, gc, x, y, im): |
| 206 | im = cbook._unmultiplied_rgba8888_to_premultiplied_argb32(im[::-1]) |
| 207 | surface = cairo.ImageSurface.create_for_data( |
| 208 | im.ravel().data, cairo.FORMAT_ARGB32, |
| 209 | im.shape[1], im.shape[0], im.shape[1] * 4) |
| 210 | ctx = gc.ctx |
| 211 | y = self.height - y - im.shape[0] |
| 212 | |
| 213 | ctx.save() |
| 214 | ctx.set_source_surface(surface, float(x), float(y)) |
| 215 | ctx.paint() |
| 216 | ctx.restore() |
| 217 | |
| 218 | def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): |
| 219 | # docstring inherited |