Author: Kore Nordmann
Date: 2007-01-24 17:55:32 +0100 (Wed, 24 Jan 2007)
New Revision: 4564

Log:
- 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.

Modified:
   trunk/Graph/src/driver/flash.php
   trunk/Graph/src/driver/svg.php
   
trunk/Graph/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleLinearFilledLine.swf
   
trunk/Graph/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleNonFilled.swf
   
trunk/Graph/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleRadialFilledLine.swf
   
trunk/Graph/tests/data/compare/ezcGraphPieChartTest_testRender3dPieChartWithOneDataPoint.svg
   
trunk/Graph/tests/data/compare/ezcGraphPieChartTest_testRenderPieChartWithOneDataPoint.svg
   
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartSymbols.svg
   
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithGleamAndShadow.svg
   
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderNegativeBarChartSymbols.svg
   
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPimpedBarChart.svg
   
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleNonFilled.svg

Modified: trunk/Graph/src/driver/flash.php
===================================================================
--- trunk/Graph/src/driver/flash.php    2007-01-24 16:32:45 UTC (rev 4563)
+++ trunk/Graph/src/driver/flash.php    2007-01-24 16:55:32 UTC (rev 4564)
@@ -768,6 +768,13 @@
             $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 )
         {

Modified: trunk/Graph/src/driver/svg.php
===================================================================
--- trunk/Graph/src/driver/svg.php      2007-01-24 16:32:45 UTC (rev 4563)
+++ trunk/Graph/src/driver/svg.php      2007-01-24 16:55:32 UTC (rev 4564)
@@ -985,8 +985,8 @@
         $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', 

Modified: 
trunk/Graph/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleLinearFilledLine.swf
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleNonFilled.swf
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphFlashDriverTest_testDrawCircleRadialFilledLine.swf
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphPieChartTest_testRender3dPieChartWithOneDataPoint.svg
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphPieChartTest_testRenderPieChartWithOneDataPoint.svg
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartSymbols.svg
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithGleamAndShadow.svg
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderNegativeBarChartSymbols.svg
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderPimpedBarChart.svg
===================================================================
(Binary files differ)

Modified: 
trunk/Graph/tests/data/compare/ezcGraphSvgDriverTest_testDrawCircleNonFilled.svg
===================================================================
(Binary files differ)

-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to