code: def render_image(self, rgbobj, dst_x, dst_y):
          
          self.logger.debug("redraw surface")
          if self.surface is None:
              return
  
          # Prepare array for Cairo rendering
          # TODO: is there some high-bit depth option for Cairo?
          arr = rgbobj.get_array(self.rgb_order, dtype=np.uint8)
  
          daht, dawd, depth = arr.shape
          self.logger.debug("arr shape is %dx%dx%d" % (dawd, daht, depth))
  
          cr = cairo.Context(self.surface)
          # TODO: is it really necessary to hang on to this context?
          self.cr = cr
  
          # fill surface with background color
          imgwin_wd, imgwin_ht = self.viewer.get_window_size()
          cr.rectangle(0, 0, imgwin_wd, imgwin_ht)
          r, g, b = self.viewer.get_bg()
          cr.set_source_rgba(r, g, b)
          cr.fill()
  
          stride = cairo.ImageSurface.format_stride_for_width(cairo.FORMAT_ARGB32,
                                                              dawd)
          img_surface = cairo.ImageSurface.create_for_data(arr,
                                                           cairo.FORMAT_ARGB32,
                                                           dawd, daht, stride)
  
          cr.set_source_surface(img_surface, dst_x, dst_y)
          cr.set_operator(cairo.OPERATOR_SOURCE)
  
          cr.mask_surface(img_surface, dst_x, dst_y)
          cr.fill()
docs: Render the image represented by (rgbobj) at dst_x, dst_y
          in the pixel space.