'Draw the Image instance into the current axes; x is the
distance in pixels from the left hand side of the canvas and y
is the distance from bottom'

def draw_image(self, gc, x, y, im, transform=None):

    (h, w, bits, imagecmd) = self._get_image_h_w_bits_command(im)
    hexlines = '\n'.join(self._hex_lines(bits)).decode(u'ascii')
    if (transform is None):
        matrix = u'1    0    0    1    0    0'
        xscale = (w / self.image_magnification)
        yscale = (h / self.image_magnification)
    else:
        matrix = u'    '.join(map(str, transform.frozen().to_values()))
        xscale = 1.0
        yscale = 1.0
    figh = (self.height * 72)
    bbox = gc.get_clip_rectangle()
    (clippath, clippath_trans) = gc.get_clip_path()
    clip = []
    if (bbox is not None):
        (clipx, clipy, clipw, cliph) = bbox.bounds
        clip.append((u'%s    clipbox' % _nums_to_str(clipw, cliph, clipx, clipy)))
    if (clippath is not None):
        id = self._get_clip_path(clippath, clippath_trans)
        clip.append((u'%s' % id))
    clip = u'\n'.join(clip)
    ps = (u'gsave\n%(clip)s\n%(x)s    %(y)s    translate\n[%(matrix)s]    concat\n%(xscale)s    %(yscale)s    scale\n/DataString    %(w)s    string    def\n%(w)s    %(h)s    8    [    %(w)s    0    0    -%(h)s    0    %(h)s    ]\n{\ncurrentfile    DataString    readhexstring    pop\n}    bind    %(imagecmd)s\n%(hexlines)s\ngrestore\n' % locals())
    self._pswriter.write(ps)
