[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/test/gzz/vob textvob.test
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz/test/gzz/vob textvob.test |
Date: |
Thu, 21 Nov 2002 06:06:33 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/11/21 06:06:33
Modified files:
test/gzz/vob : textvob.test
Log message:
TextVob.getHeight() and getWidth() fail with GL
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/vob/textvob.test.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gzz/test/gzz/vob/textvob.test
diff -u gzz/test/gzz/vob/textvob.test:1.5 gzz/test/gzz/vob/textvob.test:1.6
--- gzz/test/gzz/vob/textvob.test:1.5 Thu Nov 21 05:09:11 2002
+++ gzz/test/gzz/vob/textvob.test Thu Nov 21 06:06:33 2002
@@ -38,45 +38,46 @@
"""Tests that TextVob is drawn with the width and height
that it claims with getWidth() and getHeight().
- fail: AWT
+ fail: GL
"""
vs = getvs()
size = vs.getSize()
vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red))
- textvob = gzz.vob.vobs.TextVob(sty1, "XÅÅÅÅÅX")
- text_size = 50
+ text_size = 50;
+ textvob = gzz.vob.vobs.TextVob(sty1, "XÄjÖgqÅypX")
text_scale = sty1.getScaleByHeight(text_size)
text_width = int(textvob.getWidth(text_scale))
text_height = int(textvob.getHeight(text_scale))
+ text_depth = int(textvob.getDepth(text_scale))
cs = vs.orthoBoxCS(0, "window", 0, 100, 100, 1, 1, size.width,
size.height)
- cs_text = vs.orthoCS(cs, "text", 0, 0, 0, text_size, text_size)
+ cs_text = vs.orthoCS(cs, "text", 0, 0, 0, text_height + text_depth,
text_height + text_depth)
vs.map.put(textvob, cs_text)
render(vs)
"""The top edge."""
- checkNotAvgColor(100, 100, text_width, 5, (255, 0, 0), delta=1)
+ checkNotAvgColor(100, 100, text_width, 10, (255, 0, 0), delta=1)
"""The left edge."""
- checkNotAvgColor(100, 100, 5, text_height, (255, 0, 0), delta=1)
+ checkNotAvgColor(100, 100, 10, text_height+text_depth, (255, 0, 0),
delta=1)
"""The right edge."""
- checkNotAvgColor(100+text_width-5, 100, 5, text_height, (255, 0, 0),
delta=1)
+ checkNotAvgColor(100+text_width-10, 100, 10, text_height+text_depth, (255,
0, 0), delta=1)
"""The bottom edge."""
- checkNotAvgColor(100, 100+text_height-5, text_width, 5, (255, 0, 0),
delta=1)
+ checkNotAvgColor(100, 100+text_height-1, text_width, text_depth+1, (255,
0, 0), delta=1)
"""The top side."""
- checkAvgColor(100, 100-6, text_width, 5, (255, 0, 0), delta=1)
+ checkAvgColor(100, 100-10, text_width, 10, (255, 0, 0), delta=1)
"""The left side."""
- checkAvgColor(100-6, 100, 5, text_height, (255, 0, 0), delta=1)
+ checkAvgColor(100-10, 100, 10, text_height+text_depth, (255, 0, 0),
delta=1)
"""The right side."""
- checkAvgColor(100+text_width+1, 100, 5, text_height, (255, 0, 0), delta=1)
+ checkAvgColor(100+text_width+1, 100, 10, text_height+text_depth, (255, 0,
0), delta=1)
"""The bottom side."""
- checkAvgColor(100, 100+text_height+1, text_width, 5, (255, 0, 0), delta=1)
+ checkAvgColor(100, 100+text_height+text_depth+1, text_width, 10, (255, 0,
0), delta=1)
# : vim: set syntax=python :
- [Gzz-commits] gzz/test/gzz/vob textvob.test,
Asko Soukka <=