[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9768: Another read-matrix-from-swf
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9768: Another read-matrix-from-swf case |
Date: |
Wed, 17 Sep 2008 19:34:04 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9768
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2008-09-17 19:34:04 +0200
message:
Another read-matrix-from-swf case
modified:
testsuite/misc-ming.all/matrix_test.c
------------------------------------------------------------
revno: 9767.1.1
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Wed 2008-09-17 19:33:10 +0200
message:
Add another read-matrix-from-swf test (none had scales != 100 before)
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-17 15:59:14 +0000
+++ b/testsuite/misc-ming.all/matrix_test.c 2008-09-17 17:33:10 +0000
@@ -748,6 +748,32 @@
check(mo, "!staticmc.hitTest(0, 269, false)"); // overup
check(mo, "!staticmc.hitTest(0, 331, false)"); // overdown
+ SWFMovie_nextFrame(mo);
+ SWFDisplayItem_setMatrix(it, -2, 0, -45, -0.5, 50, 300); // negative x
scale and some positive skew
+
+ check_equals(mo, "staticmc._x", "50");
+ check_equals(mo, "staticmc._y", "300");
+ check_equals(mo, "staticmc._xscale", "200");
+ check_equals(mo, "Math.round(staticmc._yscale)", "4500"); // let's
tollerate precision for now
+ check_equals(mo, "staticmc._rotation", "180");
+ check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05
30.05,30.05'");
+ check_equals(mo, "printBounds(staticmc.getBounds(_root))",
"'-1362.35,285 1462.35,315.05'");
+ check_equals(mo, "staticmc._width", "2824.7");
+ check_equals(mo, "staticmc._height", "30.05");
+
+ // X: -1362.35 1462.35
+ // Y: 285.00 315.05
+
+ check(mo, "staticmc.hitTest(-1362, 286, false)"); // top-left
+ check(mo, "staticmc.hitTest(1462, 286, false)"); // top-right
+ check(mo, "staticmc.hitTest(-1362, 315, false)"); // bottom-left
+ check(mo, "staticmc.hitTest(1462, 315, false)"); // bottom-right
+
+ check(mo, "!staticmc.hitTest(-1363, 300, false)"); // overleft
+ check(mo, "!staticmc.hitTest(1463, 300, false)"); // overright
+ check(mo, "!staticmc.hitTest(0, 284, false)"); // overup
+ check(mo, "!staticmc.hitTest(0, 316, false)"); // overdown
+
//
// Now test setting parameters after reading matrix
@@ -981,7 +1007,7 @@
SWFMovie_nextFrame(mo);
- add_actions(mo, "_root.totals(470); stop();");
+ add_actions(mo, "_root.totals(487); stop();");
SWFMovie_nextFrame(mo);
//Output movie
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9768: Another read-matrix-from-swf case,
Sandro Santilli <=