diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 09:52:09 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 09:52:09 +0000 |
commit | 9fe5c1ce375e75ce093ace1f251fc54bf391b5c8 (patch) | |
tree | 31e193c19dd67fd638c965d18cac99a91826dcf1 /src/driver | |
parent | f01b8b1bdfb55dd7e77c8b9eec8def3989a6560c (diff) | |
download | zetacomponents-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')
-rw-r--r-- | src/driver/flash.php | 18 | ||||
-rw-r--r-- | src/driver/svg.php | 16 |
2 files changed, 30 insertions, 4 deletions
diff --git a/src/driver/flash.php b/src/driver/flash.php index 409b107..38c07a2 100644 --- a/src/driver/flash.php +++ b/src/driver/flash.php @@ -194,7 +194,14 @@ class ezcGraphFlashDriver extends ezcGraphDriver { // The middle of the border is on the outline of a polygon in ming, // fix that: - $points = $this->reducePolygonSize( $points, $thickness / 2 ); + try + { + $points = $this->reducePolygonSize( $points, $thickness / 2 ); + } + catch( ezcGraphReducementFailedException $e ) + { + return false; + } } $shape = new SWFShape(); @@ -616,7 +623,14 @@ class ezcGraphFlashDriver extends ezcGraphDriver if ( !$filled ) { - $reduced = $this->reduceEllipseSize( $center, $width, $height, $startAngle, $endAngle, .5 ); + try + { + $reduced = $this->reduceEllipseSize( $center, $width, $height, $startAngle, $endAngle, .5 ); + } + catch( ezcGraphReducementFailedException $e ) + { + return false; + } $startAngle = $reduced['startAngle']; $endAngle = $reduced['endAngle']; 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', |