summaryrefslogtreecommitdiffstats
path: root/examples3/fontdisplayer.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples3/fontdisplayer.py')
-rwxr-xr-xexamples3/fontdisplayer.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples3/fontdisplayer.py b/examples3/fontdisplayer.py
index 7e66572..1f616bf 100755
--- a/examples3/fontdisplayer.py
+++ b/examples3/fontdisplayer.py
@@ -41,15 +41,15 @@ class FontRowTable( TQFrame ):
fm = self.fontMetrics()
ml = self.frameWidth() + self.margin() + 1 + max(0,-fm.minLeftBearing())
mt = self.frameWidth() + self.margin()
- cell = TQSize((self.width()-15-ml)/16,(self.height()-15-mt)/16)
+ cell = TQSize(int((self.width()-15-ml)/16),int((self.height()-15-mt)/16))
if not cell.width() or not cell.height() :
return
- mini = r.left() / cell.width()
- maxi = (r.right()+cell.width()-1) / cell.width()
- minj = r.top() / cell.height()
- maxj = (r.bottom()+cell.height()-1) / cell.height()
+ mini = int(r.left() / cell.width())
+ maxi = int((r.right()+cell.width()-1) / cell.width())
+ minj = int(r.top() / cell.height())
+ maxj = int((r.bottom()+cell.height()-1) / cell.height())
h = fm.height()
@@ -83,13 +83,13 @@ class FontRowTable( TQFrame ):
else: sign = positive
if l > 0: lsign = 0
else: lsign = 1
- p.fillRect(x+lsign, y-h/2, abs(l),-h/2, TQBrush(sign))
+ p.fillRect(x+lsign, int(y-h/2), abs(l),int(-h/2), TQBrush(sign))
if r :
if r < 0: sign = rnegative
else: sign = rpositive
if r > 0: rsign = r
else: rsign = 0
- p.fillRect(x+w-rsign,y+2, abs(r),-h/2, TQBrush(sign))
+ p.fillRect(int(x+w-rsign),y+2, abs(r),int(-h/2), TQBrush(sign))
s = TQString( ch )
p.setPen(TQPen(TQt.black))
p.drawText(x,y,s)