diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-11-08 13:10:05 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-11-08 13:10:05 (GMT) |
commit | 1d98109a6248d48c166122d79e112f35a4f4b8c1 (patch) | |
tree | d306d94fe5afdba3f26793c0010e8749e6cec215 | |
parent | bf9eb84e8acbc9de477f74b231b142512ce39d91 (diff) |
using new grid overlay mechanism for speed up with Cairo graphics
-rwxr-xr-x | turtleart.py | 21 |
1 files changed, 2 insertions, 19 deletions
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. ''' |