[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/test/vob/api vobcoorder.test
From: |
Matti Katila |
Subject: |
[Gzz-commits] libvob/test/vob/api vobcoorder.test |
Date: |
Wed, 23 Apr 2003 12:34:26 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Matti Katila <address@hidden> 03/04/23 12:34:26
Modified files:
test/vob/api : vobcoorder.test
Log message:
comments for tjl
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/api/vobcoorder.test.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: libvob/test/vob/api/vobcoorder.test
diff -u libvob/test/vob/api/vobcoorder.test:1.6
libvob/test/vob/api/vobcoorder.test:1.7
--- libvob/test/vob/api/vobcoorder.test:1.6 Wed Apr 23 09:37:06 2003
+++ libvob/test/vob/api/vobcoorder.test Wed Apr 23 12:34:26 2003
@@ -108,16 +108,30 @@
failUnlessEqual(cs1, c.getCSAt(0, 150, 150, None))
def testActiveDepthWithTrans():
+ # These codes should be equivalent!
+ # if (GraphicsAPI.getInstance() instanceof GLAPI) {
+ # int focusCtr = vs.translateCS(0, "FocusCenter", ctrX,ctrY);
+ # frameCS = vs.orthoBoxCS(focusCtr, "FocusFrame", 200,
+ # -width/2, -height/2, 1, 1,
+ # width, height);
+ # } else {
+ # frameCS = vs.orthoBoxCS(0, "FocusFrame", 200,
+ # ctrX - width/2, ctrY - height/2, 1, 1,
+ # width, height);
+ # }
+ # but they are not as this test finds out
s = vs.size
- cs1 = c.orthoBox(0, 100,0,0,1,1, s.width, s.height)
- vs.activate(cs1)
-
- cs2 = vs.translateCS(0, "trans_to_center", s.width/2, s.height/2)
- cs3 = vs.orthoCS(cs2, "box",0, -s.width/4, -s.height/4, s.width/2,
s.height/2)
- vs.activate(cs3)
+ # translate in the center
+ cs1 = vs.translateCS(0, "trans_to_center", s.width/2, s.height/2)
+ # make 1/4 box in the center
+ cs2 = vs.orthoBoxCS(cs1, "box",0, -s.width/4, -s.height/4, 1,1,s.width/2,
s.height/2)
+ # activate box
+ vs.activate(cs2)
+
+ # find the box from the center.
+ failUnlessEqual(cs2, c.getCSAt(0, s.width/2, s.height/2, None))
- failUnlessEqual(cs3, c.getCSAt(0, s.width/2, s.height/2, None))
def testActivateParents():
"""Test that parent relationship is used correctly.