From 8aad41077510f1b488a580b48cac038146fd389c Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sun, 21 Nov 2010 02:50:29 +0000 Subject: mapping to turtle coordinate space (#2502) --- diff --git a/pysamples/push_mouse_event.py b/pysamples/push_mouse_event.py index a79f53e..485061f 100644 --- a/pysamples/push_mouse_event.py +++ b/pysamples/push_mouse_event.py @@ -32,8 +32,8 @@ def myblock(lc, x): if lc.tw.mouse_flag == 1: # push y first so x will be popped first - lc.heap.append(lc.tw.mouse_y) - lc.heap.append(lc.tw.mouse_x) + lc.heap.append((lc.tw.canvas.height / 2) - lc.tw.mouse_y) + lc.heap.append(lc.tw.mouse_x - (lc.tw.canvas.width / 2)) lc.heap.append(1) # mouse event lc.tw.mouse_flag = 0 else: -- cgit v0.9.1