From 3b87909382235a0842dba5e493a764804fa572ce Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 18 Sep 2012 15:40:29 +0000 Subject: add gray as argument to fill screen block --- (limited to 'TurtleArt/tacanvas.py') diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index 5d25f40..fb42422 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -487,10 +487,15 @@ class TurtleGraphics: self.tw.send_event(event) def fillscreen(self, c, s): - ''' Fill screen with color/shade and reset to defaults ''' - oldc, olds = self.color, self.shade + ''' Deprecated method: Fill screen with color/shade ''' + self.fillscreen_with_gray(c, s, self.gray) + + def fillscreen_with_gray(self, c, s, g): + ''' Fill screen with color/shade/gray and reset to defaults ''' + oldc, olds, oldg = self.color, self.shade, self.gray self.setcolor(c, False) self.setshade(s, False) + self.setgray(g, False) self.bgrgb = self.fgrgb[:] def _fillscreen(cr, rgb, w, h): @@ -504,6 +509,7 @@ class TurtleGraphics: _fillscreen(self.cr_svg, self.fgrgb, self.width, self.height) self.setcolor(oldc, False) self.setshade(olds, False) + self.setgray(oldg, False) self.fill = False self.poly_points = [] -- cgit v0.9.1