Exemple #1
0
    def _draw_mainlayer(self, gc, view_bounds=None, mode="default"):

        if exists(self.image_file):
            gc.save_state()

            img = KivaImage(self.image_file)

            w, h = img.width(), img.height()
            self.bounds = [w, h]
            gc.draw_image(img, (self.x, self.y, w, h))

            gc.restore_state()
Exemple #2
0
    def _draw_mainlayer(self, gc, view_bounds=None, mode="default"):

        if exists(self.image_file):
            gc.save_state()

    #        self.image_file.seek(0)
            img = KivaImage(self.image_file)

            x = gc.width() * 0.7
            y = gc.height() * 0.15
            w, h = img.width(), img.height()

            # Use Image's ability to draw itself onto a gc to paint the window.
            gc.draw_image(img, (x, y, w, h))

            self.position = [x, y]
            self.bounds = [w, h]

            gc.restore_state()