[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11208: Test line styles in drawing
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11208: Test line styles in drawing API, where Gnash fails miserably. |
Date: |
Tue, 07 Jul 2009 13:16:00 +0200 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 11208
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2009-07-07 13:16:00 +0200
message:
Test line styles in drawing API, where Gnash fails miserably.
modified:
testsuite/misc-ming.all/DrawingApiTest.as
testsuite/misc-ming.all/DrawingApiTestRunner.cpp
------------------------------------------------------------
revno: 11207.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Tue 2009-07-07 12:49:42 +0200
message:
Add test for Gnash's line style failure to DrawingApiTest (drawing 3).
modified:
testsuite/misc-ming.all/DrawingApiTest.as
------------------------------------------------------------
revno: 11207.1.2
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Tue 2009-07-07 13:10:51 +0200
message:
Make line colours easier to distinguish and add pixel checking to the
test runner.
modified:
testsuite/misc-ming.all/DrawingApiTest.as
testsuite/misc-ming.all/DrawingApiTestRunner.cpp
=== modified file 'testsuite/misc-ming.all/DrawingApiTest.as'
--- a/testsuite/misc-ming.all/DrawingApiTest.as 2008-10-13 15:39:16 +0000
+++ b/testsuite/misc-ming.all/DrawingApiTest.as 2009-07-07 11:10:51 +0000
@@ -573,6 +573,73 @@
_visible = false;
}
+createEmptyMovieClip("line", 110);
+with(line) {
+
+ col = 0xff0000;
+ colc = 100;
+ x = 20;
+ y = 20;
+ xr = 100;
+ yr = 100;
+ n = 10;
+ alpha = 100;
+
+ // =======================
+ // Shape 1
+ // =======================
+
+ beginFill(col,colc);
+ lineStyle(n,0x0000ff,alpha);
+
+ moveTo(x,y);
+ lineTo(x+xr,y);
+ lineTo((x+xr),(y+yr));
+
+ // In Gnash, next line forces a new path,
+ // and closeup of the former (shouldn't)
+ //
+ lineStyle(n,0x00ff00,alpha);
+
+ lineTo(x,(y+yr));
+ lineTo(x,y);
+
+ endFill();
+
+ // =======================
+ // Shape 2
+ // =======================
+
+ x += 200;
+
+ beginFill(col,colc);
+ lineStyle(n,1,alpha);
+
+ moveTo(x,y);
+ lineTo(x+xr,y);
+
+ lineStyle(n,0x0000ff,alpha);
+
+ lineTo((x+xr),(y+yr));
+
+ lineStyle(n,0x00ff00,alpha);
+
+ lineTo(x,(y+yr));
+ lineTo(x,y);
+
+ endFill();
+
+ _visible = false;
+}
+line.onRollOver = function() {};
+
+// Check the the top right diagonal half of Shape 2.
+xcheck(line.hitTest(270, 40, true));
+
+// Check the bottom left diagonal half of Shape 2.
+check(line.hitTest(230, 80, true));
+
+
//---------------------------------------------------------------------------
//
//---------------------------------------------------------------------------
@@ -700,10 +767,12 @@
};
+
visibleIndex = 0;
page = new Array;
page[0] = a;
page[1] = inv;
+page[2] = line;
onKeyDown = function()
{
var ascii = Key.getAscii();
=== modified file 'testsuite/misc-ming.all/DrawingApiTestRunner.cpp'
--- a/testsuite/misc-ming.all/DrawingApiTestRunner.cpp 2009-04-03 09:48:13
+0000
+++ b/testsuite/misc-ming.all/DrawingApiTestRunner.cpp 2009-07-07 11:10:51
+0000
@@ -758,6 +758,37 @@
// Cairo succeeds.
check_pixel(xo + (20*scale), yo + (25*scale), 3, white, 2);
+ // Test picture 3
+ tester.pressKey(gnash::key::_3); tester.advance();
+
+ // Shape 1
+
+ // Bottom left corner (green line).
+ check_pixel(20, 120, 2, green, 2);
+ // Bottom left fill (red)
+ check_pixel(40, 80, 2, red, 2);
+ // Top right fill (red)
+ check_pixel(100, 40, 2, red, 2);
+ // Dead centre fill (red)
+ xcheck_pixel(70, 70, 2, red, 2);
+ // Top right corner (blue line)
+ check_pixel(120, 20, 2, blue, 2);
+
+ // Shape 2
+
+ // Bottom left corner (green line).
+ check_pixel(220, 120, 2, green, 2);
+ // Bottom left fill (red)
+ check_pixel(240, 80, 2, red, 2);
+ // Top right fill (red)
+ xcheck_pixel(300, 40, 2, red, 2);
+ // Dead centre fill (red)
+ xcheck_pixel(270, 70, 2, red, 2);
+ // Top right corner (blue line, is correct to be over black line ending)
+ check_pixel(320, 20, 2, blue, 2);
+ // Top centre (black line)
+ check_pixel(270, 20, 2, black, 2);
+
//----------------------------------------------------------
// TODO: check startDrag/stopDrag on the hit detector
// (hit 'd' key to toggle)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11208: Test line styles in drawing API, where Gnash fails miserably.,
Benjamin Wolsey <=