[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9876: Add another matrix test showi
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9876: Add another matrix test showing that the failures in MovieClip.as |
Date: |
Tue, 30 Sep 2008 10:20:05 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9876
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Tue 2008-09-30 10:20:05 +0200
message:
Add another matrix test showing that the failures in MovieClip.as
were not related to being _root or not. We get the matrix values wrong
but the actual transforms succeed...
modified:
testsuite/misc-ming.all/matrix_test.c
=== modified file 'testsuite/misc-ming.all/matrix_test.c'
--- a/testsuite/misc-ming.all/matrix_test.c 2008-09-30 07:39:32 +0000
+++ b/testsuite/misc-ming.all/matrix_test.c 2008-09-30 08:20:05 +0000
@@ -78,7 +78,6 @@
SWFMovie mo;
SWFMovieClip dejagnuclip;
SWFDisplayItem it;
- int i;
const char *srcdir=".";
if ( argc>1 )
@@ -896,6 +895,49 @@
SWFDisplayItem_remove(it);
it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
+ SWFDisplayItem_setMatrix(it, 1, 0, 0, -2, 200, 200);
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,139.9 230.05,260.1'");
+ check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0,
d=-2, tx=200, ty=200)'");
+
+ check_equals(mo, "staticmc._xscale", "100");
+ check_equals(mo, "staticmc._rotation", "0");
+ check_equals(mo, "staticmc._yscale", "200");
+ add_actions(mo, "staticmc._yscale = 100;"); // swap _yscale sign using
ActionScript
+ check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0,
c=0, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._rotation", "0");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170
230,230'");
+ add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap
_yscale sign using ActionScript
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,169.95 230.05,230.05'");
+ check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0,
d=1, tx=200, ty=200)'");
+ add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap
_yscale sign using ActionScript
+ xcheck_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1,
b=0, c=0, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'169.95,169.95 230.05,230.05'");
+
+ check_equals(mo, "staticmc._xscale", "100");
+ add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap
_xscale sign using ActionScript
+ xcheck_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=0, c=0, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "staticmc._xscale", "-100");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170
230,230'");
+
+ add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using
ActionScript
+ xcheck_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=-0.03, c=0.03, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._xscale", "-100");
+ check_equals(mo, "staticmc._rotation", "2");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'169,169
231,231'");
+
+ add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using
ActionScript
+ xcheck_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1,
b=0.03, c=-0.03, d=-1, tx=200, ty=200)'");
+ check_equals(mo, "staticmc._yscale", "100");
+ check_equals(mo, "staticmc._xscale", "-100");
+ check_equals(mo, "staticmc._rotation", "-2");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'169,169
231,231'");
+
+ SWFMovie_nextFrame(mo);
+
+ SWFDisplayItem_remove(it);
+ it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
SWFDisplayItem_setMatrix(it, 1, 0, 2, 1, 200, 200);
check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'109.85,169.95 290.15,230.05'");
check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=2,
d=1, tx=200, ty=200)'");
@@ -1736,7 +1778,7 @@
SWFMovie_nextFrame(mo);
- add_actions(mo, "_root.totals(984); stop();");
+ add_actions(mo, "_root.totals(1011); stop();");
SWFMovie_nextFrame(mo);
//Output movie
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9876: Add another matrix test showing that the failures in MovieClip.as,
Sandro Santilli <=