diff options
Diffstat (limited to 'TurtleArt/tacanvas.py')
-rw-r--r-- | TurtleArt/tacanvas.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index 03f69fc..30431a7 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -566,6 +566,13 @@ class TurtleGraphics: int(w), int(h)), False) + def read_pixel(self, x, y): + """ Read the pixel at x, y """ + if self.tw.interactive_mode: + return self.canvas.get_pixel((x, y)) + else: + return(-1, -1, -1, -1) + def set_turtle(self, k, colors=None): """ Select the current turtle and associated pen status """ if not self.tw.turtles.dict.has_key(k): |