Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tacanvas.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-08-12 22:09:54 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-08-12 22:09:54 (GMT)
commitb3d151b60e285339a4f39708f5dce818151a8419 (patch)
tree449f0057fc4043a464eab63804866cc2c16207ae /TurtleArt/tacanvas.py
parent26355ab5b517d65d87cfcb239fca5365ec49cd49 (diff)
read pixel block
Diffstat (limited to 'TurtleArt/tacanvas.py')
-rw-r--r--TurtleArt/tacanvas.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py
index 30431a7..667cc0f 100644
--- a/TurtleArt/tacanvas.py
+++ b/TurtleArt/tacanvas.py
@@ -566,10 +566,11 @@ class TurtleGraphics:
int(w), int(h)),
False)
- def read_pixel(self, x, y):
+ def get_pixel(self):
""" Read the pixel at x, y """
if self.tw.interactive_mode:
- return self.canvas.get_pixel((x, y))
+ return self.canvas.get_pixel((self.width / 2 + int(self.xcor),
+ self.height / 2 - int(self.ycor)))
else:
return(-1, -1, -1, -1)