summaryrefslogtreecommitdiffstats
path: root/src/driver/svg.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 /src/driver/svg.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 'src/driver/svg.php')
-rw-r--r--src/driver/svg.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/driver/svg.php b/src/driver/svg.php
index daaa7c5..18ce4bd 100644
--- a/src/driver/svg.php
+++ b/src/driver/svg.php
@@ -332,7 +332,13 @@ class ezcGraphSvgDriver extends ezcGraphDriver
{
// The middle of the border is on the outline of a polygon in SVG,
// fix that:
- $points = $this->reducePolygonSize( $points, $thickness / 2 );
+ try
+ {
+ $points = $this->reducePolygonSize( $points, $thickness / 2 );
+ } catch ( ezcGraphReducementFailedException $e )
+ {
+ return false;
+ }
}
$lastPoint = end( $points );
@@ -845,7 +851,13 @@ class ezcGraphSvgDriver extends ezcGraphDriver
}
else
{
- $reduced = $this->reduceEllipseSize( $center, $width * 2, $height * 2, $startAngle, $endAngle, .5 );
+ try
+ {
+ $reduced = $this->reduceEllipseSize( $center, $width * 2, $height * 2, $startAngle, $endAngle, .5 );
+ } catch ( ezcGraphReducementFailedException $e )
+ {
+ return false;
+ }
$arc = $this->dom->createElement( 'path' );
$arc->setAttribute( 'd', sprintf( 'M %.2f,%.2f L %.2f,%.2f A %.2f,%.2f 0 %d,1 %.2f,%.2f z',
OpenPOWER on IntegriCloud