summaryrefslogtreecommitdiffstats
path: root/src/driver
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-01-24 16:55:32 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-01-24 16:55:32 +0000
commitfe04d7e0bf5409422364a1fb80870dc724719dad (patch)
treeece3cd291c93d885be6f4ae5c21e5e8d63c9386d /src/driver
parentc8a76997f44fdf4e9f219ec5edc450b6bebdc919 (diff)
downloadzetacomponents-graph-fe04d7e0bf5409422364a1fb80870dc724719dad.zip
zetacomponents-graph-fe04d7e0bf5409422364a1fb80870dc724719dad.tar.gz
- Partly fixed issue #9765
# Circles are now drawn at the right position. This does not resolve the # bug, because ellipses segments are still broken. # Small visual difference in some files, due to the nature of this bug.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/flash.php7
-rw-r--r--src/driver/svg.php4
2 files changed, 9 insertions, 2 deletions
diff --git a/src/driver/flash.php b/src/driver/flash.php
index c565eff..4c438fa 100644
--- a/src/driver/flash.php
+++ b/src/driver/flash.php
@@ -768,6 +768,13 @@ class ezcGraphFlashDriver extends ezcGraphDriver
$this->modifyCoordinate( $center->y )
);
+ // Reduce size
+ if ( !$filled )
+ {
+ $width -= 1;
+ $height -= 1;
+ }
+
// @TODO: User SWFShape::curveTo
for ( $angle = $this->options->circleResolution; $angle <= 360; $angle += $this->options->circleResolution )
{
diff --git a/src/driver/svg.php b/src/driver/svg.php
index 6031514..b886988 100644
--- a/src/driver/svg.php
+++ b/src/driver/svg.php
@@ -985,8 +985,8 @@ class ezcGraphSvgDriver extends ezcGraphDriver
$ellipse = $this->dom->createElement( 'ellipse' );
$ellipse->setAttribute( 'cx', round( $center->x + $this->options->graphOffset->x, 4 ) );
$ellipse->setAttribute( 'cy', round( $center->y + $this->options->graphOffset->y, 4 ) );
- $ellipse->setAttribute( 'rx', round( $width / 2, 4 ) );
- $ellipse->setAttribute( 'ry', round( $height / 2, 4 ) );
+ $ellipse->setAttribute( 'rx', round( $width / 2 - ( $filled ? 0 : .5 ), 4 ) );
+ $ellipse->setAttribute( 'ry', round( $height / 2 - ( $filled ? 0 : .5 ), 4 ) );
$ellipse->setAttribute(
'style',
OpenPOWER on IntegriCloud