def copy_image_to_context(self, context, position, rotation=0, zoom=None):
        """Draw a cached image on the context

        :param context: The Cairo context to draw on
        :param position: The position od the image
        """
        if not zoom:
            zoom = self.__zoom
        zoom_multiplicator = zoom * self.multiplicator
        context.save()
        context.scale(1. / zoom_multiplicator, 1. / zoom_multiplicator)

        image_position = round(position[0] * zoom_multiplicator), round(position[1] * zoom_multiplicator)
        context.translate(*image_position)
        context.rotate(rotation)
        context.set_source_surface(self.__image, 0, 0)

        context.paint()
        context.restore()
def copy_image_to_context ( self , context , position , rotation = 0 , zoom = None ) : if not zoom : zoom = self . __zoom zoom_multiplicator = zoom * self . multiplicator context . save ( ) context . scale ( 1. / zoom_multiplicator , 1. / zoom_multiplicator ) image_position = round ( position [ 0 ] * zoom_multiplicator ) , round ( position [ 1 ] * zoom_multiplicator ) context . translate ( * image_position ) context . rotate ( rotation ) context . set_source_surface ( self . __image , 0 , 0 ) context . paint ( ) context . restore ( )
Draw a cached image on the context

        :param context: The Cairo context to draw on
        :param position: The position od the image