From b3d151b60e285339a4f39708f5dce818151a8419 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 12 Aug 2010 22:09:54 +0000 Subject: read pixel block --- (limited to 'TurtleArt/tacanvas.py') 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) -- cgit v0.9.1