mirror of https://github.com/python/cpython.git
*** empty log message ***
This commit is contained in:
parent
a2a181a6a3
commit
17fca179bc
|
@ -54,12 +54,9 @@ def settext(self, text):
|
||||||
self.redraw()
|
self.redraw()
|
||||||
#
|
#
|
||||||
def setbounds(self, bounds):
|
def setbounds(self, bounds):
|
||||||
if self.bounds <> _rect.empty:
|
|
||||||
self.parent.change(self.bounds)
|
|
||||||
self.bounds = bounds
|
self.bounds = bounds
|
||||||
if self.bounds <> _rect.empty:
|
if self.bounds <> _rect.empty:
|
||||||
self.recalc()
|
self.recalc()
|
||||||
self.parent.change(bounds)
|
|
||||||
#
|
#
|
||||||
def realize(self):
|
def realize(self):
|
||||||
pass
|
pass
|
||||||
|
@ -109,14 +106,15 @@ def recalctextpos(self):
|
||||||
#
|
#
|
||||||
def redraw(self):
|
def redraw(self):
|
||||||
if self.bounds <> _rect.empty:
|
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)):
|
def draw(self, (d, area)):
|
||||||
area = _rect.intersect(area, self.bounds)
|
area = _rect.intersect(area, self.bounds)
|
||||||
if area = _rect.empty:
|
if area = _rect.empty:
|
||||||
return
|
return
|
||||||
d.cliprect(area)
|
d.cliprect(area)
|
||||||
d.erase(self.bounds)
|
|
||||||
self.drawit(d)
|
self.drawit(d)
|
||||||
d.noclip()
|
d.noclip()
|
||||||
#
|
#
|
||||||
|
@ -203,11 +201,10 @@ class RadioAppearance() = CheckAppearance():
|
||||||
def drawpict(self, d):
|
def drawpict(self, d):
|
||||||
(left, top), (right, bottom) = self.boxbounds
|
(left, top), (right, bottom) = self.boxbounds
|
||||||
radius = self.size / 2
|
radius = self.size / 2
|
||||||
h, v = left + radius, top + radius
|
center = left + radius, top + radius
|
||||||
d.circle((h, v), radius)
|
d.circle(center, radius)
|
||||||
if self.selected:
|
if self.selected:
|
||||||
some = radius/3
|
d.fillcircle(center, radius*3/5)
|
||||||
d.paint((h-some, v-some), (h+some, v+some))
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ def append(self, y):
|
||||||
def draw(self, (d, area)):
|
def draw(self, (d, area)):
|
||||||
area = rect.intersect(area, self.bounds)
|
area = rect.intersect(area, self.bounds)
|
||||||
if area = rect.empty:
|
if area = rect.empty:
|
||||||
print 'mt'
|
|
||||||
return
|
return
|
||||||
d.cliprect(area)
|
d.cliprect(area)
|
||||||
d.erase(self.bounds)
|
d.erase(self.bounds)
|
||||||
|
|
|
@ -54,12 +54,9 @@ def settext(self, text):
|
||||||
self.redraw()
|
self.redraw()
|
||||||
#
|
#
|
||||||
def setbounds(self, bounds):
|
def setbounds(self, bounds):
|
||||||
if self.bounds <> _rect.empty:
|
|
||||||
self.parent.change(self.bounds)
|
|
||||||
self.bounds = bounds
|
self.bounds = bounds
|
||||||
if self.bounds <> _rect.empty:
|
if self.bounds <> _rect.empty:
|
||||||
self.recalc()
|
self.recalc()
|
||||||
self.parent.change(bounds)
|
|
||||||
#
|
#
|
||||||
def realize(self):
|
def realize(self):
|
||||||
pass
|
pass
|
||||||
|
@ -109,14 +106,15 @@ def recalctextpos(self):
|
||||||
#
|
#
|
||||||
def redraw(self):
|
def redraw(self):
|
||||||
if self.bounds <> _rect.empty:
|
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)):
|
def draw(self, (d, area)):
|
||||||
area = _rect.intersect(area, self.bounds)
|
area = _rect.intersect(area, self.bounds)
|
||||||
if area = _rect.empty:
|
if area = _rect.empty:
|
||||||
return
|
return
|
||||||
d.cliprect(area)
|
d.cliprect(area)
|
||||||
d.erase(self.bounds)
|
|
||||||
self.drawit(d)
|
self.drawit(d)
|
||||||
d.noclip()
|
d.noclip()
|
||||||
#
|
#
|
||||||
|
@ -203,11 +201,10 @@ class RadioAppearance() = CheckAppearance():
|
||||||
def drawpict(self, d):
|
def drawpict(self, d):
|
||||||
(left, top), (right, bottom) = self.boxbounds
|
(left, top), (right, bottom) = self.boxbounds
|
||||||
radius = self.size / 2
|
radius = self.size / 2
|
||||||
h, v = left + radius, top + radius
|
center = left + radius, top + radius
|
||||||
d.circle((h, v), radius)
|
d.circle(center, radius)
|
||||||
if self.selected:
|
if self.selected:
|
||||||
some = radius/3
|
d.fillcircle(center, radius*3/5)
|
||||||
d.paint((h-some, v-some), (h+some, v+some))
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ def append(self, y):
|
||||||
def draw(self, (d, area)):
|
def draw(self, (d, area)):
|
||||||
area = rect.intersect(area, self.bounds)
|
area = rect.intersect(area, self.bounds)
|
||||||
if area = rect.empty:
|
if area = rect.empty:
|
||||||
print 'mt'
|
|
||||||
return
|
return
|
||||||
d.cliprect(area)
|
d.cliprect(area)
|
||||||
d.erase(self.bounds)
|
d.erase(self.bounds)
|
||||||
|
|
Loading…
Reference in New Issue