gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r9884: Re-enable a test in MovieClip


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9884: Re-enable a test in MovieClip.as temporarely commented-out to avoid
Date: Tue, 30 Sep 2008 18:08:51 -0400
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9884
committer: Sandro Santilli <address@hidden>
branch nick: gnash-head
timestamp: Tue 2008-09-30 18:08:51 -0400
message:
  Re-enable a test in MovieClip.as temporarely commented-out to avoid
  having to fix immediately (it's fixed now). Add anotehr test to 
  matrix_test.swf to show effects of negative _xscale cache at time
  of setting _rotation. I'm pretty satisfied about matrices at this point.
modified:
  testsuite/actionscript.all/MovieClip.as
  testsuite/misc-ming.all/matrix_test.c
=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as   2008-09-30 20:34:33 +0000
+++ b/testsuite/actionscript.all/MovieClip.as   2008-09-30 22:08:51 +0000
@@ -103,7 +103,7 @@
 #endif
 
 #if OUTPUT_VERSION >= 8
-       check_totals(799); // SWF8+
+       check_totals(800); // SWF8+
 #endif
 
        play();
@@ -1484,15 +1484,18 @@
 
 check_equals(_root.transform.matrix.toString(), "(a=1, b=0, c=0, d=1, tx=30, 
ty=20)");
 
-//_root._xscale = -300; // NOTE: gnash breaks the _root's matrix if we set 
_xscale here ! you can tell by failing localToGLobal/globalToLocal tests
+_root._xscale = -300; 
+
+check_equals(_root.transform.matrix.toString(), "(a=-3, b=0, c=0, d=1, tx=30, 
ty=20)");
+
 _root._yscale = -200;
 
-check_equals(_root.transform.matrix.toString(), "(a=1, b=0, c=0, d=-2, tx=30, 
ty=20)");
+check_equals(_root.transform.matrix.toString(), "(a=-3, b=0, c=0, d=-2, tx=30, 
ty=20)");
 
 _root._rotation = -90;
 
 check_equals(_root.transform.matrix.a, 0);
-check_equals(_root.transform.matrix.b, -1); // would be 3 if we did set 
_xscale=-300 above
+check_equals(_root.transform.matrix.b, 3); 
 check_equals(_root.transform.matrix.c, -2);
 check_equals(_root.transform.matrix.d, 0);
 check_equals(_root.transform.matrix.tx, 30);
@@ -1502,11 +1505,11 @@
 _root.transform.matrix.ty = 300;
 check_equals(_root._y, 20); // changing the AS matrix doesn't change the 
actual matrix
 
-check_equals(_root.transform.matrix.toString(), "(a=0, b=-1, c=-2, d=0, tx=30, 
ty=20)");
+check_equals(_root.transform.matrix.toString(), "(a=0, b=3, c=-2, d=0, tx=30, 
ty=20)");
 
 _root._x = _root._y = _root._rotation = 0;
 
-check_equals(_root.transform.matrix.toString(), "(a=1, b=0, c=0, d=-2, tx=0, 
ty=0)");
+check_equals(_root.transform.matrix.toString(), "(a=-3, b=0, c=0, d=-2, tx=0, 
ty=0)");
 
 _root._xscale = 100;
 

=== modified file 'testsuite/misc-ming.all/matrix_test.c'
--- a/testsuite/misc-ming.all/matrix_test.c     2008-09-30 21:21:01 +0000
+++ b/testsuite/misc-ming.all/matrix_test.c     2008-09-30 22:08:51 +0000
@@ -1855,8 +1855,39 @@
        check_equals(mo, "staticmc._yscale", "200");
 
        SWFMovie_nextFrame(mo);
-
-       add_actions(mo, "_root.totals(1063); stop();");
+       SWFDisplayItem_remove(it);
+       it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
+       SWFDisplayItem_setMatrix(it, 1, 0, 0, 1, 0, 0); 
+       check_equals(mo, "printBounds(staticmc.getBounds(_root))", 
"'-30.05,-30.05 30.05,30.05'");
+       check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, 
c=0, d=1, tx=0, ty=0)'");
+       check_equals(mo, "staticmc._rotation", "0");
+       check_equals(mo, "staticmc._xscale", "100");
+       check_equals(mo, "staticmc._yscale", "100");
+
+       add_actions(mo, "staticmc._xscale = -200;"); // change _yscale using 
ActionScript
+       check_equals(mo, "printBounds(staticmc.getBounds(_root))", 
"'-60.1,-30.05 60.1,30.05'");
+       check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-2, b=0, 
c=0, d=1, tx=0, ty=0)'");
+       check_equals(mo, "staticmc._rotation", "0");
+       check_equals(mo, "staticmc._xscale", "-200");
+       check_equals(mo, "staticmc._yscale", "100");
+
+       add_actions(mo, "staticmc._rotation = -90;"); // change _rotation using 
ActionScript
+       check_equals(mo, "printBounds(staticmc.getBounds(_root))", 
"'-30.05,-60.1 30.05,60.1'");
+       check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=2, 
c=1, d=0, tx=0, ty=0)'");
+       check_equals(mo, "staticmc._rotation", "-90");
+       check_equals(mo, "staticmc._xscale", "-200");
+       check_equals(mo, "staticmc._yscale", "100");
+
+       add_actions(mo, "staticmc._rotation = 90;"); // change _rotation using 
ActionScript
+       check_equals(mo, "printBounds(staticmc.getBounds(_root))", 
"'-30.05,-60.1 30.05,60.1'");
+       check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=-2, 
c=-1, d=0, tx=0, ty=0)'");
+       check_equals(mo, "staticmc._rotation", "90");
+       check_equals(mo, "staticmc._xscale", "-200");
+       check_equals(mo, "staticmc._yscale", "100");
+
+       SWFMovie_nextFrame(mo);
+
+       add_actions(mo, "_root.totals(1083); stop();");
        SWFMovie_nextFrame(mo);        
 
        //Output movie


reply via email to

[Prev in Thread] Current Thread [Next in Thread]