Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tacanvas.py
diff options
context:
space:
mode:
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)