From 9fe5c1ce375e75ce093ace1f251fc54bf391b5c8 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Thu, 10 May 2007 09:52:09 +0000 Subject: - 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 --- src/driver/svg.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/driver/svg.php') 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', -- cgit v1.1