diff options
Diffstat (limited to 'TurtleArt')
-rw-r--r-- | TurtleArt/sprites.py | 15 | ||||
-rw-r--r-- | TurtleArt/tacanvas.py | 2 |
2 files changed, 3 insertions, 14 deletions
diff --git a/TurtleArt/sprites.py b/TurtleArt/sprites.py index 412e3bd..baae94f 100644 --- a/TurtleArt/sprites.py +++ b/TurtleArt/sprites.py @@ -450,16 +450,5 @@ class Sprite: cs.flush() # ensure all writing is done # Read the pixel pixels = cs.get_data() - return (ord(pixels[0]), ord(pixels[1]), ord(pixels[2]), 0) - ''' - # Map the cairo surface onto a pixmap - pixmap = gtk.gdk.Pixmap(None, self.rect.width, self.rect.height, 24) - cr = pixmap.cairo_create() - cr.set_source_surface(self.cached_surfaces[i], 0, 0) - cr.paint() - # Read the pixel - pixel = pixmap.get_image(x, y, 1, 1).get_pixel(0, 0) - return(int((pixel & 0xFF0000) >> 16), - int((pixel & 0x00FF00) >> 8), - int((pixel & 0x0000FF) >> 0), 0) - ''' + return (ord(pixels[2]), ord(pixels[1]), ord(pixels[0]), 0) + diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index 49f0e8a..43e5ad2 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -719,7 +719,7 @@ class TurtleGraphics: cs.flush() # ensure all writing is done # Read the pixel pixels = cs.get_data() - return (ord(pixels[0]), ord(pixels[1]), ord(pixels[2]), 0) + return (ord(pixels[2]), ord(pixels[1]), ord(pixels[0]), 0) else: return(-1, -1, -1, -1) |