summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-29 09:10:48 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-29 09:10:48 +0000
commitf7e1b8683290c347a00e80c0b3779e05892842e1 (patch)
treefbf927864ae5c80d6bbf9bd14c658bc8d9be5c8b /tests
parente9f7f66fef8d66865eae4cf731bf502c19dc948e (diff)
downloadzetacomponents-graph-f7e1b8683290c347a00e80c0b3779e05892842e1.zip
zetacomponents-graph-f7e1b8683290c347a00e80c0b3779e05892842e1.tar.gz
- Fixed issue #10861 Circle sector size reducement failes for very big angles.
Diffstat (limited to 'tests')
-rw-r--r--tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle.svg2
-rw-r--r--tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle2.svg2
-rw-r--r--tests/driver_svg_test.php66
3 files changed, 70 insertions, 0 deletions
diff --git a/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle.svg b/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle.svg
new file mode 100644
index 0000000..1c112d7
--- /dev/null
+++ b/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle.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 100.00,50.00 L 139.50,50.50 A 39.50,19.50 0 1,1 139.48,49.22 z" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 0.50; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_1"/></g></svg>
diff --git a/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle2.svg b/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle2.svg
new file mode 100644
index 0000000..3148a9c
--- /dev/null
+++ b/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleSectorBorderReducementWithReallyBigAngle2.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 100.00,50.00 L 139.50,50.50 A 39.50,19.50 0 1,1 139.50,49.43 z" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 0.50; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_1"/></g></svg>
diff --git a/tests/driver_svg_test.php b/tests/driver_svg_test.php
index e9dffa8..5adb9d3 100644
--- a/tests/driver_svg_test.php
+++ b/tests/driver_svg_test.php
@@ -305,6 +305,72 @@ class ezcGraphSvgDriverTest extends ezcGraphTestCase
);
}
+ public function testDrawCircleSectorBorderReducementWithBiggerAngle()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->driver->drawCircleSector(
+ new ezcGraphCoordinate( 100, 50 ),
+ 80,
+ 40,
+ 10,
+ 10.8,
+ ezcGraphColor::fromHex( '#3465A480' ),
+ false
+ );
+
+ $this->driver->render( $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/empty.svg'
+ );
+ }
+
+ public function testDrawCircleSectorBorderReducementWithReallyBigAngle()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->driver->drawCircleSector(
+ new ezcGraphCoordinate( 100, 50 ),
+ 80,
+ 40,
+ 0,
+ 359.2,
+ ezcGraphColor::fromHex( '#3465A480' ),
+ false
+ );
+
+ $this->driver->render( $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
+
+ public function testDrawCircleSectorBorderReducementWithReallyBigAngle2()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->driver->drawCircleSector(
+ new ezcGraphCoordinate( 100, 50 ),
+ 80,
+ 40,
+ 0,
+ 359.8,
+ ezcGraphColor::fromHex( '#3465A480' ),
+ false
+ );
+
+ $this->driver->render( $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
+
public function testDrawPolygonBorderReducementWithShortEdge()
{
$filename = $this->tempDir . __FUNCTION__ . '.svg';
OpenPOWER on IntegriCloud