code: def render_image(self, rgbobj, dst_x, dst_y):
          
          self.logger.debug("redraw surface=%s" % (self.surface))
          if self.surface is None:
              return
          self.logger.debug("drawing to surface")
  
          # Prepare array for rendering
          # TODO: what are options for high bit depth under Qt?
          data = rgbobj.get_array(self.rgb_order, dtype=np.uint8)
          (height, width) = data.shape[:2]
  
          daht, dawd, depth = data.shape
          self.logger.debug("data shape is %dx%dx%d" % (dawd, daht, depth))
  
          # Get qimage for copying pixel data
          qimage = self._get_qimage(data)
          drawable = self.surface
  
          painter = QPainter(drawable)
          #painter.setWorldMatrixEnabled(True)
  
          # fill surface with background color
          #imgwin_wd, imgwin_ht = self.viewer.get_window_size()
          size = drawable.size()
          sf_wd, sf_ht = size.width(), size.height()
          bg = self.viewer.img_bg
          bgclr = self._get_color(*bg)
          painter.fillRect(QtCore.QRect(0, 0, sf_wd, sf_ht), bgclr)
  
          # draw image data from buffer to offscreen pixmap
          painter.drawImage(QtCore.QRect(dst_x, dst_y, width, height),
                            qimage,
                            QtCore.QRect(0, 0, width, height))
docs: Render the image represented by (rgbobj) at dst_x, dst_y
          in the pixel space.
          *** internal method-- do not use ***