summaryrefslogtreecommitdiffstats
path: root/tests/driver_svg_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-10 09:52:09 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-10 09:52:09 +0000
commit9fe5c1ce375e75ce093ace1f251fc54bf391b5c8 (patch)
tree31e193c19dd67fd638c965d18cac99a91826dcf1 /tests/driver_svg_test.php
parentf01b8b1bdfb55dd7e77c8b9eec8def3989a6560c (diff)
downloadzetacomponents-graph-9fe5c1ce375e75ce093ace1f251fc54bf391b5c8.zip
zetacomponents-graph-9fe5c1ce375e75ce093ace1f251fc54bf391b5c8.tar.gz
- Fixed issue #10746: Border size reducement algorithm fails for polygones
with edge lengths < reducement # Modifications in comparision files because some invisible small shapes # were not rendered any more
Diffstat (limited to 'tests/driver_svg_test.php')
-rw-r--r--tests/driver_svg_test.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/driver_svg_test.php b/tests/driver_svg_test.php
index 375212d..489f38d 100644
--- a/tests/driver_svg_test.php
+++ b/tests/driver_svg_test.php
@@ -261,6 +261,72 @@ class ezcGraphSvgDriverTest extends ezcGraphTestCase
);
}
+ public function testDrawCircleSectorBorderReducementWithSmallAngle()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->driver->drawCircleSector(
+ new ezcGraphCoordinate( 100, 50 ),
+ 80,
+ 40,
+ 10,
+ 10.2,
+ ezcGraphColor::fromHex( '#3465A480' ),
+ false
+ );
+
+ $this->driver->render( $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/empty.svg'
+ );
+ }
+
+ public function testDrawCircleSectorBorderReducementWithSlightlyBiggerAngle()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->driver->drawCircleSector(
+ new ezcGraphCoordinate( 100, 50 ),
+ 80,
+ 40,
+ 10,
+ 10.72,
+ ezcGraphColor::fromHex( '#3465A480' ),
+ false
+ );
+
+ $this->driver->render( $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/empty.svg'
+ );
+ }
+
+ public function testDrawPolygonBorderReducementWithShortEdge()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->driver->drawPolygon(
+ array(
+ new ezcGraphCoordinate( 45, 12 ),
+ new ezcGraphCoordinate( 122, 34 ),
+ new ezcGraphCoordinate( 122, 33.8 ),
+ ),
+ ezcGraphColor::fromHex( '#3465A4' ),
+ false
+ );
+
+ $this->driver->render( $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/empty.svg'
+ );
+ }
+
public function testDrawCircleSectorAcuteNonFilled()
{
$filename = $this->tempDir . __FUNCTION__ . '.svg';
OpenPOWER on IntegriCloud