Author: kn Date: Wed Nov 21 11:14:22 2007 New Revision: 6778 Log: - Added test for drawing two lines with different line width
Added: trunk/Graph/tests/data/compare/ezcGraphGdDriverTest_testDrawLineWithDifferentWidths.png (with props) Modified: trunk/Graph/tests/driver_gd_test.php Added: trunk/Graph/tests/data/compare/ezcGraphGdDriverTest_testDrawLineWithDifferentWidths.png ============================================================================== Binary file - no diff available. Propchange: trunk/Graph/tests/data/compare/ezcGraphGdDriverTest_testDrawLineWithDifferentWidths.png ------------------------------------------------------------------------------ svn:mime-type = image/png Modified: trunk/Graph/tests/driver_gd_test.php ============================================================================== --- trunk/Graph/tests/driver_gd_test.php [iso-8859-1] (original) +++ trunk/Graph/tests/driver_gd_test.php [iso-8859-1] Wed Nov 21 11:14:22 2007 @@ -146,6 +146,38 @@ ); } + public function testDrawLineWithDifferentWidths() + { + $filename = $this->tempDir . __FUNCTION__ . '.png'; + + $this->driver->drawLine( + new ezcGraphCoordinate( 12, 45 ), + new ezcGraphCoordinate( 134, 12 ), + ezcGraphColor::fromHex( '#3465A4' ), + 3 + ); + + $this->driver->drawLine( + new ezcGraphCoordinate( 12, 35 ), + new ezcGraphCoordinate( 134, 2 ), + ezcGraphColor::fromHex( '#3465A4' ) + ); + + $this->driver->render( $filename ); + + $this->assertTrue( + file_exists( $filename ), + 'No image was generated.' + ); + + $this->assertImageSimilar( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.png', + 'Image does not look as expected.', + 2000 + ); + } + public function testDrawPolygonThreePointsFilled() { $filename = $this->tempDir . __FUNCTION__ . '.png'; -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components