From 17fca179bc3de0106cd10b2341663f72946b8cfe Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 14 May 1991 12:13:40 +0000 Subject: *** empty log message *** --- Lib/lib-stdwin/Buttons.py | 15 ++++++--------- Lib/lib-stdwin/StripChart.py | 1 - Lib/stdwin/Buttons.py | 15 ++++++--------- Lib/stdwin/StripChart.py | 1 - 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/Lib/lib-stdwin/Buttons.py b/Lib/lib-stdwin/Buttons.py index b864c56..d991c96 100644 --- a/Lib/lib-stdwin/Buttons.py +++ b/Lib/lib-stdwin/Buttons.py @@ -54,12 +54,9 @@ class LabelAppearance(): self.redraw() # def setbounds(self, bounds): - if self.bounds <> _rect.empty: - self.parent.change(self.bounds) self.bounds = bounds if self.bounds <> _rect.empty: self.recalc() - self.parent.change(bounds) # def realize(self): pass @@ -109,14 +106,15 @@ class LabelAppearance(): # def redraw(self): if self.bounds <> _rect.empty: - self.draw(self.parent.begindrawing(), self.bounds) + d = self.parent.begindrawing() + d.erase(self.bounds) + self.draw(d, self.bounds) # def draw(self, (d, area)): area = _rect.intersect(area, self.bounds) if area = _rect.empty: return d.cliprect(area) - d.erase(self.bounds) self.drawit(d) d.noclip() # @@ -203,11 +201,10 @@ class RadioAppearance() = CheckAppearance(): def drawpict(self, d): (left, top), (right, bottom) = self.boxbounds radius = self.size / 2 - h, v = left + radius, top + radius - d.circle((h, v), radius) + center = left + radius, top + radius + d.circle(center, radius) if self.selected: - some = radius/3 - d.paint((h-some, v-some), (h+some, v+some)) + d.fillcircle(center, radius*3/5) # diff --git a/Lib/lib-stdwin/StripChart.py b/Lib/lib-stdwin/StripChart.py index e97dae2..67d7de1 100644 --- a/Lib/lib-stdwin/StripChart.py +++ b/Lib/lib-stdwin/StripChart.py @@ -52,7 +52,6 @@ class StripChart() = LabelAppearance(), NoReactivity(): def draw(self, (d, area)): area = rect.intersect(area, self.bounds) if area = rect.empty: - print 'mt' return d.cliprect(area) d.erase(self.bounds) diff --git a/Lib/stdwin/Buttons.py b/Lib/stdwin/Buttons.py index b864c56..d991c96 100755 --- a/Lib/stdwin/Buttons.py +++ b/Lib/stdwin/Buttons.py @@ -54,12 +54,9 @@ class LabelAppearance(): self.redraw() # def setbounds(self, bounds): - if self.bounds <> _rect.empty: - self.parent.change(self.bounds) self.bounds = bounds if self.bounds <> _rect.empty: self.recalc() - self.parent.change(bounds) # def realize(self): pass @@ -109,14 +106,15 @@ class LabelAppearance(): # def redraw(self): if self.bounds <> _rect.empty: - self.draw(self.parent.begindrawing(), self.bounds) + d = self.parent.begindrawing() + d.erase(self.bounds) + self.draw(d, self.bounds) # def draw(self, (d, area)): area = _rect.intersect(area, self.bounds) if area = _rect.empty: return d.cliprect(area) - d.erase(self.bounds) self.drawit(d) d.noclip() # @@ -203,11 +201,10 @@ class RadioAppearance() = CheckAppearance(): def drawpict(self, d): (left, top), (right, bottom) = self.boxbounds radius = self.size / 2 - h, v = left + radius, top + radius - d.circle((h, v), radius) + center = left + radius, top + radius + d.circle(center, radius) if self.selected: - some = radius/3 - d.paint((h-some, v-some), (h+some, v+some)) + d.fillcircle(center, radius*3/5) # diff --git a/Lib/stdwin/StripChart.py b/Lib/stdwin/StripChart.py index e97dae2..67d7de1 100755 --- a/Lib/stdwin/StripChart.py +++ b/Lib/stdwin/StripChart.py @@ -52,7 +52,6 @@ class StripChart() = LabelAppearance(), NoReactivity(): def draw(self, (d, area)): area = rect.intersect(area, self.bounds) if area = rect.empty: - print 'mt' return d.cliprect(area) d.erase(self.bounds) -- cgit v0.12