summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-11-30 13:20:11 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-11-30 13:20:11 +0000
commit94182972f32db9770cc9bbe158e4a05aa3860c42 (patch)
tree219fd99613b6a0d16957a609240ad7f63f183b12
parentf7ffcb314f4cbb09e3ae16653a944f11201dd1d1 (diff)
downloadzetacomponents-graph-94182972f32db9770cc9bbe158e4a05aa3860c42.zip
zetacomponents-graph-94182972f32db9770cc9bbe158e4a05aa3860c42.tar.gz
- Fixed: Bug #9549 (Pie chart slices not contiguous with Ming driver)
-rw-r--r--ChangeLog1
-rw-r--r--src/driver/flash.php15
-rw-r--r--tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcute.swfbin101 -> 103 bytes
-rw-r--r--tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteNonFilled.swfbin123 -> 128 bytes
-rw-r--r--tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteReverse.swfbin101 -> 103 bytes
-rw-r--r--tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleBigCircleSectors.swfbin543 -> 544 bytes
-rw-r--r--tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleCircleSectors.swfbin732 -> 738 bytes
-rw-r--r--tests/data/compare/ezcGraphFlashDriverTest_testRenderLabeledFlashPieChart.swfbin48982 -> 49051 bytes
8 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 94e5cb4..2f9e561 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
- Fixed issue #9568: Devision by zero warning
- Fixed issue #9655: pieChartOffset and highlight do not work together in 2d
renderer
+- Fixed issue #9549: Pie chart slices not contiguous with Ming driver
- Fixed issue #9545: pie chart tresh hold does not work if agregated data
stays below tresh hold
diff --git a/src/driver/flash.php b/src/driver/flash.php
index 2b9380e..6e11d68 100644
--- a/src/driver/flash.php
+++ b/src/driver/flash.php
@@ -588,17 +588,20 @@ class ezcGraphFlashDriver extends ezcGraphDriver
$shape->movePenTo( $this->modifyCoordinate( $center->x ), $this->modifyCoordinate( $center->y ) );
// @TODO: User SWFShape::curveTo
- for ( $angle = $startAngle; $angle <= $endAngle; $angle += $this->options->circleResolution )
+ for(
+ $angle = $startAngle;
+ $angle <= $endAngle;
+ $angle = min( $angle + $this->options->circleResolution, $endAngle ) )
{
- $angle = min(
- $angle,
- $endAngle
- );
-
$shape->drawLineTo(
$this->modifyCoordinate( $center->x + cos( deg2rad( $angle ) ) * $width / 2 ),
$this->modifyCoordinate( $center->y + sin( deg2rad( $angle ) ) * $height / 2 )
);
+
+ if ( $angle === $endAngle )
+ {
+ break;
+ }
}
$shape->drawLineTo(
diff --git a/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcute.swf b/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcute.swf
index eb3639b..06182bd 100644
--- a/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcute.swf
+++ b/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcute.swf
Binary files differ
diff --git a/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteNonFilled.swf b/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteNonFilled.swf
index 9cfca93..e981e92 100644
--- a/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteNonFilled.swf
+++ b/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteNonFilled.swf
Binary files differ
diff --git a/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteReverse.swf b/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteReverse.swf
index 4c3d8dd..0263081 100644
--- a/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteReverse.swf
+++ b/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleSectorAcuteReverse.swf
Binary files differ
diff --git a/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleBigCircleSectors.swf b/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleBigCircleSectors.swf
index c195d8e..b396462 100644
--- a/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleBigCircleSectors.swf
+++ b/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleBigCircleSectors.swf
Binary files differ
diff --git a/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleCircleSectors.swf b/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleCircleSectors.swf
index efccdb8..5a37a6c 100644
--- a/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleCircleSectors.swf
+++ b/tests/data/compare/ezcGraphFlashDriverTest_testDrawMultipleCircleSectors.swf
Binary files differ
diff --git a/tests/data/compare/ezcGraphFlashDriverTest_testRenderLabeledFlashPieChart.swf b/tests/data/compare/ezcGraphFlashDriverTest_testRenderLabeledFlashPieChart.swf
index ef2ef82..9bf8394 100644
--- a/tests/data/compare/ezcGraphFlashDriverTest_testRenderLabeledFlashPieChart.swf
+++ b/tests/data/compare/ezcGraphFlashDriverTest_testRenderLabeledFlashPieChart.swf
Binary files differ
OpenPOWER on IntegriCloud