gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Drawing...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Drawing...
Date: Wed, 07 Nov 2007 10:05:38 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/11/07 10:05:37

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: DrawingApiTest.as 
                                 DrawingApiTestRunner.cpp 

Log message:
                * testsuite/misc-ming.all/DrawingApiTest.as: have '-' and '+'
                  use a step of 25% instead of 20% (easier for pixel checking);
                  add hitTest for the opposite-el case.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4790&r2=1.4791
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTest.as?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp?cvsroot=gnash&r1=1.29&r2=1.30

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4790
retrieving revision 1.4791
diff -u -b -r1.4790 -r1.4791
--- ChangeLog   7 Nov 2007 09:01:18 -0000       1.4790
+++ ChangeLog   7 Nov 2007 10:05:37 -0000       1.4791
@@ -1,3 +1,11 @@
+2007-11-07 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/DrawingApiTest.as: have '-' and '+'
+         use a step of 25% instead of 20% (easier for pixel checking);
+         add hitTest for the opposite-el case.
+       * testsuite/misc-ming.all/DrawingApiTestRunner.cpp: add pixel
+         checking for the nested-squares cases.
+
 2007-11-07 Udo Giacomozzi <address@hidden>
 
        * testsuite/libgeometry/snappingrangetest.cpp: update testcase

Index: testsuite/misc-ming.all/DrawingApiTest.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTest.as,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- testsuite/misc-ming.all/DrawingApiTest.as   6 Nov 2007 18:49:29 -0000       
1.21
+++ testsuite/misc-ming.all/DrawingApiTest.as   7 Nov 2007 10:05:37 -0000       
1.22
@@ -17,7 +17,7 @@
 // 'h' toggles _visible
 //
 
-rcsid="$Id: DrawingApiTest.as,v 1.21 2007/11/06 18:49:29 strk Exp $";
+rcsid="$Id: DrawingApiTest.as,v 1.22 2007/11/07 10:05:37 strk Exp $";
 
 #include "../actionscript.all/check.as"
 
@@ -279,16 +279,24 @@
 
                moveTo(10, 8);
                lineTo(10, 20);
-               lineTo(5, 20);
+               lineTo(2, 20);
 
                moveTo(18, 8);
                lineTo(18, 20);
-               lineTo(23, 20);
+               lineTo(26, 20);
 
        }
        inv3._xscale = inv3._yscale = 400; inv3._y = 100;
        inv3.onRollOver = function() {};
 
+       check(  inv3.hitTest((8*4), 100 + (18*4), true)  );  // Inside the left 
autofill
+       check( !inv3.hitTest((4*4), 100 + (10*4), true)  );  // Outside the 
left autofill (but in the boundaries)
+       check(  inv3.hitTest((4*4), 100 + (10*4), false) );  // Outside the 
left autofill (but in the boundaries)
+
+       check(  inv3.hitTest((20*4), 100 + (18*4), true)  );  // Inside the 
right autofill
+       check( !inv3.hitTest((24*4), 100 + (10*4), true)  );  // Outside the 
right autofill (but in the boundaries)
+       check(  inv3.hitTest((24*4), 100 + (10*4), false) );  // Outside the 
right autofill (but in the boundaries)
+
        // Nested squares (inner is an hole)
        // Both squares are defined in counterclockwise order
        createEmptyMovieClip("inv4", 4);
@@ -604,13 +612,13 @@
        }
        else if ( ascii == 45 ) // '-' - decrease alpha
        {
-               var newAlpha = page[visibleIndex]._alpha - 20;
+               var newAlpha = page[visibleIndex]._alpha - 25;
                if ( newAlpha < 0 ) newAlpha = 0;
                page[visibleIndex]._alpha = newAlpha;
        }
        else if ( ascii == 43 ) // '+' - increase alpha
        {
-               var newAlpha = page[visibleIndex]._alpha + 20;
+               var newAlpha = page[visibleIndex]._alpha + 25;
                if ( newAlpha > 100 ) newAlpha = 100;
                page[visibleIndex]._alpha = newAlpha;
        }

Index: testsuite/misc-ming.all/DrawingApiTestRunner.cpp
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- testsuite/misc-ming.all/DrawingApiTestRunner.cpp    6 Nov 2007 20:18:19 
-0000       1.29
+++ testsuite/misc-ming.all/DrawingApiTestRunner.cpp    7 Nov 2007 10:05:37 
-0000       1.30
@@ -90,6 +90,9 @@
        rgba blue(0, 0, 255, 255);
        rgba cyan(0, 255, 255, 255);
        rgba green(0, 255, 0, 255);
+       rgba light_green(128, 255, 128, 255); 
+       // Two greens at 50% alpha overlapping
+       rgba overlapping_light_green(64, 255, 64, 255); 
        rgba red(255, 0, 0, 255);
        rgba yellow(255, 255, 0, 255);
        rgba black(0, 0, 0, 255);
@@ -523,7 +526,7 @@
 
        // Outside the right green 'el' shape
        // (but close to the auto-closing edge)
-       check_pixel(25, 148, 2, white, 2);
+       check_pixel(90, 144, 2, white, 2);
 
        // In the left green horizontally flipped 'el' shape
        // (not explicitly closed fill)
@@ -531,7 +534,7 @@
 
        // Outside the left green 'el' shape
        // (but close to the auto-closing edge)
-       check_pixel(85, 148, 2, white, 2);
+       check_pixel(20, 144, 2, white, 2);
 
        // Between the two 'el' shapes
        xcheck_pixel(56, 170, 2, white, 2);
@@ -576,7 +579,118 @@
        xcheck_pixel(156, 57, 2, white, 2);
 
        //--------------------------------------------------------------
-       // The nested squares case (TODO)
+       // The nested squares cases 
        //--------------------------------------------------------------
+
+
+       //--------------------------------------------------------------
+       // First nested squares case (hole)
+       //--------------------------------------------------------------
+
+       // X (145..160..175)
+       // Y (145..160..175)
+
+       // center-left
+       check_pixel(145, 160, 2, green, 2);
+       // center-right
+       check_pixel(175, 160, 2, green, 2);
+       // upper-center
+       check_pixel(160, 145, 2, green, 2);
+       // lower-center
+       check_pixel(160, 175, 2, green, 2);
+       // center-center (hole)
+       check_pixel(160, 160, 2, white, 2);
+
+       //--------------------------------------------------------------
+       // Second nested squares case (hole)
+       //--------------------------------------------------------------
+
+       // X (194..210..226)
+       // Y (145..160..175)
+
+       // center-left
+       check_pixel(194, 160, 2, green, 2);
+       // center-right
+       check_pixel(226, 160, 2, green, 2);
+       // upper-center
+       check_pixel(210, 145, 2, green, 2);
+       // lower-center
+       check_pixel(210, 175, 2, green, 2);
+       // center-center (hole)
+       check_pixel(210, 160, 2, white, 2);
+
+       //--------------------------------------------------------------
+       // Third nested squares case (subshape)
+       //--------------------------------------------------------------
+
+       // X (244..260..276)
+       // Y (145..160..175)
+
+       // center-left
+       check_pixel(244, 160, 2, green, 2);
+       // center-right
+       check_pixel(276, 160, 2, green, 2);
+       // upper-center
+       check_pixel(260, 145, 2, green, 2);
+       // lower-center
+       check_pixel(260, 175, 2, green, 2);
+       // center-center (two overlapping subshapes)
+       check_pixel(260, 160, 2, green, 2);
+
+       tester.pressKey(gnash::key::MINUS); // alpha goes down to 75
+       tester.pressKey(gnash::key::MINUS); // alpha goes down to 50
+       tester.advance(); // commit
+
+       // center-left
+       check_pixel(244, 160, 2, light_green, 2);
+       // center-right
+       check_pixel(276, 160, 2, light_green, 2);
+       // upper-center
+       check_pixel(260, 145, 2, light_green, 2);
+       // lower-center
+       check_pixel(260, 175, 2, light_green, 2);
+       // center-center (two overlapping subshapes)
+       xcheck_pixel(260, 160, 2, overlapping_light_green, 2);
+
+       tester.pressKey(gnash::key::PLUS); // alpha goes up to 75
+       tester.pressKey(gnash::key::PLUS); // alpha goes up to 100
+       tester.advance(); // commit
+
+       //--------------------------------------------------------------
+       // Fourth nested squares case (subshape)
+       //--------------------------------------------------------------
+
+       // X (293..309..325)
+       // Y (145..160..175)
+
+       // center-left
+       check_pixel(294, 160, 2, green, 2);
+       // center-right
+       check_pixel(325, 160, 2, green, 2);
+       // upper-center
+       check_pixel(309, 145, 2, green, 2);
+       // lower-center
+       check_pixel(309, 175, 2, green, 2);
+       // center-center (two overlapping subshapes)
+       check_pixel(309, 160, 2, green, 2);
+
+       tester.pressKey(gnash::key::MINUS); // alpha goes down to 75
+       tester.pressKey(gnash::key::MINUS); // alpha goes down to 50
+       tester.advance(); // commit
+
+       // center-left
+       check_pixel(294, 160, 2, light_green, 2);
+       // center-right
+       check_pixel(325, 160, 2, light_green, 2);
+       // upper-center
+       check_pixel(309, 145, 2, light_green, 2);
+       // lower-center
+       check_pixel(309, 175, 2, light_green, 2);
+       // center-center (two overlapping subshapes)
+       xcheck_pixel(309, 160, 2, overlapping_light_green, 2);
+
+       tester.pressKey(gnash::key::PLUS); // alpha goes up to 75
+       tester.pressKey(gnash::key::PLUS); // alpha goes up to 100
+       tester.advance(); // commit
 }
 




reply via email to

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