From 1d98109a6248d48c166122d79e112f35a4f4b8c1 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 08 Nov 2011 13:10:05 +0000 Subject: using new grid overlay mechanism for speed up with Cairo graphics --- (limited to 'turtleart.py') diff --git a/turtleart.py b/turtleart.py index 9afc238..9669e21 100755 --- a/turtleart.py +++ b/turtleart.py @@ -476,28 +476,11 @@ class TurtleMain(): def _do_cartesian_cb(self, button): ''' Callback to display/hide Cartesian coordinate overlay. ''' - if self.tw.cartesian is True: - if self.tw.coord_scale == 1: - self.tw.overlay_shapes['Cartesian_labeled'].hide() - else: - self.tw.overlay_shapes['Cartesian'].hide() - self.tw.cartesian = False - else: - if self.tw.coord_scale == 1: - self.tw.overlay_shapes['Cartesian_labeled'].set_layer( - OVERLAY_LAYER) - else: - self.tw.overlay_shapes['Cartesian'].set_layer(OVERLAY_LAYER) - self.tw.cartesian = True + self.tw.set_cartesian(True) def _do_polar_cb(self, button): ''' Callback to display/hide Polar coordinate overlay. ''' - if self.tw.polar is True: - self.tw.overlay_shapes['polar'].hide() - self.tw.polar = False - else: - self.tw.overlay_shapes['polar'].set_layer(OVERLAY_LAYER) - self.tw.polar = True + self.tw.set_polar(True) def _do_rescale_cb(self, button): ''' Callback to rescale coordinate space. ''' -- cgit v0.9.1