diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-11-12 17:16:27 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-11-12 17:16:27 (GMT) |
commit | 6e9a1c8c55bc1124b93dc60265e1f1e04d7a893b (patch) | |
tree | cd2caeb290050a07795aa4877e12d7cbcfd416fa /TurtleArt/sprites.py | |
parent | 5beecd45a4920f3da45d6b8c45e5ba869f5b4f6e (diff) |
cscott got the pixel order backwards
Diffstat (limited to 'TurtleArt/sprites.py')
-rw-r--r-- | TurtleArt/sprites.py | 15 |
1 files changed, 2 insertions, 13 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) + |