Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-10-23 22:08:57 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-10-23 22:08:57 (GMT)
commit9a246a89a22f3ceb5e600ddb5270c0399babb3cd (patch)
tree2f46fbd1ab819ef06d52e8f758dbab065f003226 /TurtleArt/tawindow.py
parentd6606be70ed63aecde87e111421c61a696ba6d66 (diff)
referencing CONSTANTS instead of class variables
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r--TurtleArt/tawindow.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index ca0af4a..29ec4d1 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -207,22 +207,16 @@ class TurtleArtWindow():
self.selected_turtle = None
self.canvas = TurtleGraphics(self, self.width, self.height)
- self.titlex = int(-(self.canvas.width * TITLEXY[0]) / \
+ CONSTANTS['titlex'] = int(-(self.canvas.width * TITLEXY[0]) / \
(self.coord_scale * 2))
- CONSTANTS['titlex'] = self.titlex
- self.leftx = int(-(self.canvas.width * TITLEXY[0]) / \
+ CONSTANTS['leftx'] = int(-(self.canvas.width * TITLEXY[0]) / \
(self.coord_scale * 2))
- CONSTANTS['leftx'] = self.leftx
- self.rightx = 0
- CONSTANTS['rightx'] = self.rightx
- self.titley = int((self.canvas.height * TITLEXY[1]) / \
+ CONSTANTS['rightx'] = 0
+ CONSTANTS['titley'] = int((self.canvas.height * TITLEXY[1]) / \
(self.coord_scale * 2))
- CONSTANTS['titley'] = self.titley
- self.topy = int((self.canvas.height * (TITLEXY[1] - 0.125)) / \
+ CONSTANTS['topy'] = int((self.canvas.height * (TITLEXY[1] - 0.125)) / \
(self.coord_scale * 2))
- CONSTANTS['topy'] = self.topy
- self.bottomy = 0
- CONSTANTS['bottomy'] = self.bottomy
+ CONSTANTS['bottomy'] = 0
CONSTANTS['leftpos'] = int(-self.canvas.width / (self.coord_scale * 2))
CONSTANTS['toppos'] = int(self.canvas.height / (self.coord_scale * 2))
CONSTANTS['rightpos'] = int(self.canvas.width / (self.coord_scale * 2))