def render_image(self, rgbobj, dst_x, dst_y):
        """Render the image represented by (rgbobj) at dst_x, dst_y
        in the pixel space.
        """
        if self.surface is None:
            return
        canvas = self.surface
        self.logger.debug("redraw surface")

        # get window contents as an array and store it into the CV surface
        rgb_arr = self.getwin_array(order=self._rgb_order)
        # TODO: is there a faster way to copy this array in?
        canvas[:,:,:] = rgb_arr

        cr = CvHelp.CvContext(canvas)

        # Draw a cross in the center of the window in debug mode
        if self.t_['show_pan_position']:
            ctr_x, ctr_y = self.get_center()
            pen = cr.get_pen('red')
            cr.line((ctr_x - 10, ctr_y), (ctr_x + 10, ctr_y), pen)
            cr.line((ctr_x, ctr_y - 10), (ctr_x, ctr_y + 10), pen)

        # render self.message
        if self.message:
            font = cr.get_font(self.t_['onscreen_ff'], 14.0, self.img_fg,
                               linewidth=2)
            wd, ht = cr.text_extents(self.message, font)
            imgwin_wd, imgwin_ht = self.get_window_size()
            y = ((imgwin_ht // 3) * 2) - (ht // 2)
            x = (imgwin_wd // 2) - (wd // 2)
            cr.text((x, y), self.message, font)

        # for debugging
        #self.save_rgb_image_as_file('/tmp/temp.png', format='png')
dataset/ETHPy150Open ejeschke/ginga/ginga/cvw/ImageViewCv.py/ImageViewCv.render_image/original