code: def render_image2(self, rgbobj, dst_x, dst_y):
          
          self.logger.debug("redraw surface")
          if self.figure is None:
              return
  
          ## left, bottom, width, height = self.ax_img.bbox.bounds
          ## self._imgwin_wd, self._imgwin_ht = width, height
  
          # Grab the RGB array for the current image and place it in the
          # matplotlib figure axis
          arr = self.getwin_array(order=self.rgb_order, dtype=np.uint8)
  
          # Get the data extents
          x0, y0 = 0, 0
          y1, x1 = arr.shape[:2]
          flipx, flipy, swapxy = self.get_transforms()
          if swapxy:
              x0, x1, y0, y1 = y0, y1, x0, x1
  
          extent = (x0, x1, y1, y0)
          self.logger.debug("extent=%s" % (str(extent)))
  
          # Calculate aspect ratio
          aspect = self.calculate_aspect(arr.shape, extent)
  
          if self.mpimage is None:
              img = self.ax_img.imshow(arr, interpolation='none',
                                       origin="upper",
                                       vmin=0, vmax=255,
                                       extent=extent,
                                       aspect=aspect)
              self.mpimage = img
  
          else:
              self.mpimage.set_data(arr)
              self.ax_img.set_aspect(aspect)
              self.mpimage.set_extent(extent)
docs: Render the image represented by (rgbobj) at dst_x, dst_y
          in the pixel space.
  
          NOTE: this version renders the image in an Axes with imshow().