CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/11/07 16:15:18
Modified files: . : ChangeLog testsuite/misc-ming.all: DrawingApiTest.as DrawingApiTestRunner.cpp Log message: * testsuite/misc-ming.all/DrawingApiTest.as: Add Udo's example drawing and associated hitTest tests (xfailing) * testsuite/misc-ming.all/DrawingApiTestRunner.cpp: Add pixel checking for Udo's example drawing (xfailing due to visible stroke) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4794&r2=1.4795 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTest.as?cvsroot=gnash&r1=1.22&r2=1.23 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp?cvsroot=gnash&r1=1.32&r2=1.33 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4794 retrieving revision 1.4795 diff -u -b -r1.4794 -r1.4795 --- ChangeLog 7 Nov 2007 14:06:15 -0000 1.4794 +++ ChangeLog 7 Nov 2007 16:15:17 -0000 1.4795 @@ -1,5 +1,12 @@ 2007-11-07 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/misc-ming.all/DrawingApiTest.as: Add Udo's example drawing + and associated hitTest tests (xfailing) + * testsuite/misc-ming.all/DrawingApiTestRunner.cpp: Add pixel checking + for Udo's example drawing (xfailing due to visible stroke) + +2007-11-07 Sandro Santilli <[EMAIL PROTECTED]> + * server/DynamicShape.cpp: close filled paths on pen move and ::finalize for last path. * testsuite/misc-ming.all/DrawingApiTestRunner.cpp: all pixel checking Index: testsuite/misc-ming.all/DrawingApiTest.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTest.as,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- testsuite/misc-ming.all/DrawingApiTest.as 7 Nov 2007 10:05:37 -0000 1.22 +++ testsuite/misc-ming.all/DrawingApiTest.as 7 Nov 2007 16:15:17 -0000 1.23 @@ -17,7 +17,7 @@ // 'h' toggles _visible // -rcsid="$Id: DrawingApiTest.as,v 1.22 2007/11/07 10:05:37 strk Exp $"; +rcsid="$Id: DrawingApiTest.as,v 1.23 2007/11/07 16:15:17 strk Exp $"; #include "../actionscript.all/check.as" @@ -454,6 +454,62 @@ check( inv7.hitTest(250 + (19*4), 100 + (11*4), true) ); // Upper-Right check( inv7.hitTest(250 + (14*4), 100 + (11*4), true) ); // Upper-Center + //------------------------------------------------ + // + // Single path with complex crossing + // + // + // 10 5----4,0----------1 + // |#####|###########| + // |#####|###########| + // 20 6-----+----7######| + // | |######| + // | |######| + // 30 9----8######| + // |###########| + // 40 3-----------2 + // + // 10 20 30 40 + // + //------------------------------------------------ + createEmptyMovieClip("inv8", 8); + with (inv8) + { + beginFill(0xFF0000); + moveTo(20, 10); // 0 + lineTo(40, 10); // 1 + lineTo(40, 40); // 2 + lineTo(20, 40); // 3 + lineTo(20, 10); // 4 + + lineTo(10, 10); // 5 + lineTo(10, 20); // 6 + lineTo(30, 20); // 7 + lineTo(30, 30); // 8 + lineTo(20, 30); // 9 + + // implicit close-up to 0 (aka 4, aka 20,10) + } + + inv8._xscale = inv8._yscale = 200; + inv8._x = 200; + inv8.onRollOver = function() {}; + + check( inv8.hitTest(200 + (15*2), 0 + (15*2), true) ); // Upper-Left + xcheck( inv8.hitTest(200 + (25*2), 0 + (15*2), true) ); // Upper-Center + xcheck( inv8.hitTest(200 + (35*2), 0 + (15*2), true) ); // Upper-Right + + check( !inv8.hitTest(200 + (15*2), 0 + (25*2), true) ); // Center-Left + check( !inv8.hitTest(200 + (25*2), 0 + (25*2), true) ); // Center-Center + check( inv8.hitTest(200 + (35*2), 0 + (25*2), true) ); // Center-Right + + check( !inv8.hitTest(200 + (15*2), 0 + (35*2), true) ); // Lower-Left + xcheck( inv8.hitTest(200 + (25*2), 0 + (35*2), true) ); // Lower-Center + xcheck( inv8.hitTest(200 + (35*2), 0 + (35*2), true) ); // Lower-Right + + check( !inv8.hitTest(200 + (20*2), 0 + (25*2), true) ); // On the 0-9 stroke, out of fill + + _visible = false; } Index: testsuite/misc-ming.all/DrawingApiTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -u -b -r1.32 -r1.33 --- testsuite/misc-ming.all/DrawingApiTestRunner.cpp 7 Nov 2007 14:06:16 -0000 1.32 +++ testsuite/misc-ming.all/DrawingApiTestRunner.cpp 7 Nov 2007 16:15:17 -0000 1.33 @@ -692,5 +692,55 @@ tester.pressKey(gnash::key::PLUS); // alpha goes up to 75 tester.pressKey(gnash::key::PLUS); // alpha goes up to 100 tester.advance(); // commit + + //-------------------------------------------------------------- + // Complex single-path crossing: + // + // 10 5----4,0----------1 + // |#####|###########| + // |#####|###########| + // 20 6-----+----7######| + // | |######| + // | |######| + // 30 9----8######| + // |###########| + // 40 3-----------2 + // + // 10 20 30 40 + // + // {X,Y} Scale : 200 + // X offset : 200 + //-------------------------------------------------------------- + + int scale = 2; + int xo = 200; + int yo = 0; + + // Upper-Left + check_pixel(xo + (15*scale), yo + (15*scale), 2, red, 2); + // Upper-Center + check_pixel(xo + (25*scale), yo + (15*scale), 2, red, 2); + // Upper-On_09_stroke (Gnash fails rendering a white stroke on the red background) + xcheck_pixel(xo + (20*scale), yo + (15*scale), 2, red, 2); + // Upper-Right + check_pixel(xo + (35*scale), yo + (15*scale), 2, red, 2); + + // Center-Left + check_pixel(xo + (15*scale), yo + (25*scale), 2, white, 2); + // Center-Center + check_pixel(xo + (25*scale), yo + (25*scale), 2, white, 2); + // Center-Right + check_pixel(xo + (35*scale), yo + (25*scale), 2, red, 2); + + // Lower-Left + check_pixel(xo + (15*scale), yo + (35*scale), 2, white, 2); + // Lower-Lower + check_pixel(xo + (25*scale), yo + (35*scale), 2, red, 2); + // Lower-Right + check_pixel(xo + (35*scale), yo + (35*scale), 2, red, 2); + + // On the 0-9 stroke, out of fill (gnash fails drawing a red stroke) + xcheck_pixel(xo + (20*scale), yo + (25*scale), 3, white, 2); + } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit