[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO test/gzz/vob/textvob.test test/gzz/g...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz ./TODO test/gzz/vob/textvob.test test/gzz/g... |
Date: |
Wed, 20 Nov 2002 12:23:51 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/11/20 12:23:50
Modified files:
. : TODO
test/gzz/vob : textvob.test
test/gzz/gfx/gl: glvobcoorder.test
Log message:
Test for TextVob's getHeight and getWidth, fails with AWT.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.404&tr2=1.405&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/vob/textvob.test.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/gl/glvobcoorder.test.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.404 gzz/TODO:1.405
--- gzz/TODO:1.404 Tue Nov 19 03:50:59 2002
+++ gzz/TODO Wed Nov 20 12:23:50 2002
@@ -53,6 +53,8 @@
+ Ted's bindings for it
+ PEG asynch ms blocks
+ asynch xu links?
+ humppake:
+ - implement PEG w2sx--tjl
tuukkah:
- release engineering
- list main changes
Index: gzz/test/gzz/gfx/gl/glvobcoorder.test
diff -u gzz/test/gzz/gfx/gl/glvobcoorder.test:1.25
gzz/test/gzz/gfx/gl/glvobcoorder.test:1.26
--- gzz/test/gzz/gfx/gl/glvobcoorder.test:1.25 Wed Nov 20 10:08:22 2002
+++ gzz/test/gzz/gfx/gl/glvobcoorder.test Wed Nov 20 12:23:50 2002
@@ -273,37 +273,4 @@
putThings()
checkAvgColor(10, 10, 80, 80, (255, 0, 0), delta=50)
-def testTextVob():
- from gzz.client import GraphicsAPI
- from java.awt import Font
- style = GraphicsAPI.getInstance().getTextStyle("SansSerif", Font.PLAIN, 10)
-
- size = vs.getSize()
- def putThings():
- vs.map.clear()
- vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red))
- vs.map.put(textvob, cs_text)
- render(vs)
- textvob = gzz.vob.vobs.TextVob(style, "[XXXXX]")
- text_size = 50
- text_scale = style.getScaleByHeight(text_size)
- text_width = int(textvob.getWidth(text_scale))
- text_height = int(textvob.getHeight(text_scale))
-
- cs = c.orthoBox(0, 0, 100, 100, 1, 1, size.width, size.height)
- cs_text = c.ortho(cs, 0, 0, 0, text_size, text_size)
- putThings()
- checkNotAvgColor(100, 100, 100+text_width, 100+text_height, (255, 0, 0),
delta=5)
-
- cs = c.ortho(0, 0, 100, 100, size.width, size.height)
- cs_text = c.ortho(cs, 0, 0, 0, text_size, text_size)
- putThings()
- checkNotAvgColor(100, 100, 100+text_width, 100+text_height, (255, 0, 0),
delta=5)
-
- cs = c.affineCoordsys(0, 0, 100, 100, size.width, 0, 0, size.height)
- cs_text = c.ortho(cs, 0, 0, 0, text_size, text_size)
- putThings()
- checkNotAvgColor(100, 100, 100+text_width, 100+text_height, (255, 0, 0),
delta=5)
-
-
# : vim: set syntax=python :
Index: gzz/test/gzz/vob/textvob.test
diff -u gzz/test/gzz/vob/textvob.test:1.2 gzz/test/gzz/vob/textvob.test:1.3
--- gzz/test/gzz/vob/textvob.test:1.2 Sat Oct 19 10:29:54 2002
+++ gzz/test/gzz/vob/textvob.test Wed Nov 20 12:23:50 2002
@@ -34,4 +34,45 @@
in the same way.
"""
+def testWH():
+ """Tests that vob is drawn like it tolds as getWidth() and getHeight()."""
+ 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_scale = sty1.getScaleByHeight(text_size)
+ text_width = int(textvob.getWidth(text_scale))
+ text_height = int(textvob.getHeight(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)
+ vs.map.put(textvob, cs_text)
+ render(vs)
+
+ """The top edge."""
+ checkNotAvgColor(100, 100, text_width, 5, (255, 0, 0), delta=1)
+
+ """The left edge."""
+ checkNotAvgColor(100, 100, 5, text_height, (255, 0, 0), delta=1)
+
+ """The right edge."""
+ checkNotAvgColor(100+text_width-5, 100, 5, text_height, (255, 0, 0),
delta=1)
+
+ """The bottom edge."""
+ checkNotAvgColor(100, 100+text_height-5, text_width, 5, (255, 0, 0),
delta=1)
+
+ """The top side."""
+ checkAvgColor(100, 100-6, text_width, 5, (255, 0, 0), delta=1)
+
+ """The left side."""
+ checkAvgColor(100-6, 100, 5, text_height, (255, 0, 0), delta=1)
+
+ """The right side."""
+ checkAvgColor(100+text_width+1, 100, 5, text_height, (255, 0, 0), delta=1)
+
+ """The bottom side."""
+ checkAvgColor(100, 100+text_height+1, text_width, 5, (255, 0, 0), delta=1)
+
# : vim: set syntax=python :
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO test/gzz/vob/textvob.test test/gzz/g...,
Asko Soukka <=