summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-10-23 09:53:02 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-10-23 09:53:02 +0000
commit9d8a0e23a879caa50032bbafd5fd345732c4423b (patch)
treeeee1ab0d0ee0e4d00e4173f47d08b07f8813946a /tests
parentc7cb2aa85e0f7b4584119cc96bb908799bdf1923 (diff)
downloadzetacomponents-graph-9d8a0e23a879caa50032bbafd5fd345732c4423b.zip
zetacomponents-graph-9d8a0e23a879caa50032bbafd5fd345732c4423b.tar.gz
- Fixed issue #11640: Polygon size reducement failes for very thin four edged
polygones
Diffstat (limited to 'tests')
-rw-r--r--tests/data/compare/ezcGraphSvgDriverTest_testDrawPolygonFourPointsNotFilledBorderSizeReducement.svg2
-rw-r--r--tests/driver_svg_test.php33
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/data/compare/ezcGraphSvgDriverTest_testDrawPolygonFourPointsNotFilledBorderSizeReducement.svg b/tests/data/compare/ezcGraphSvgDriverTest_testDrawPolygonFourPointsNotFilledBorderSizeReducement.svg
new file mode 100644
index 0000000..c3c5d82
--- /dev/null
+++ b/tests/data/compare/ezcGraphSvgDriverTest_testDrawPolygonFourPointsNotFilledBorderSizeReducement.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100" version="1.0" id="ezcGraph"><defs/><g id="ezcGraphChart" color-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="optimizeLegibility"><path d=" M 24.4367,27.7272 L 24.6906,27.9766 L 30.5106,22.4890 L 30.2567,22.2397 L 24.4367,27.7272 z " style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 0.50; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_1"/><path d=" M 43.6544,8.6381 L 24.7929,28.0781 L 11.2929,41.5781 L 30.1544,22.1381 L 43.6544,8.6381 z " style="fill: #3465a4; fill-opacity: 0.50; stroke: none;" id="ezcGraphPolygon_2"/></g></svg>
diff --git a/tests/driver_svg_test.php b/tests/driver_svg_test.php
index 75233e4..16dedff 100644
--- a/tests/driver_svg_test.php
+++ b/tests/driver_svg_test.php
@@ -151,6 +151,39 @@ class ezcGraphSvgDriverTest extends ezcGraphTestCase
);
}
+ public function testDrawPolygonFourPointsNotFilledBorderSizeReducement()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->driver->drawPolygon(
+ array(
+ new ezcGraphCoordinate( 24.79289, 28.078128 ),
+ new ezcGraphCoordinate( 11.29289, 41.578128 ),
+ new ezcGraphCoordinate( 30.15439, 22.13813 ),
+ new ezcGraphCoordinate( 43.65439, 8.63813 ),
+ ),
+ ezcGraphColor::fromHex( '#3465A480' ),
+ false
+ );
+
+ $this->driver->drawPolygon(
+ array(
+ new ezcGraphCoordinate( 24.79289, 28.078128 ),
+ new ezcGraphCoordinate( 11.29289, 41.578128 ),
+ new ezcGraphCoordinate( 30.15439, 22.13813 ),
+ new ezcGraphCoordinate( 43.65439, 8.63813 ),
+ ),
+ ezcGraphColor::fromHex( '#3465A480' )
+ );
+
+ $this->driver->render( $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
+
public function testDrawPolygonThreePointsNotFilledReverse()
{
$filename = $this->tempDir . __FUNCTION__ . '.svg';
OpenPOWER on IntegriCloud