Author: Kore Nordmann Date: 2007-03-05 15:51:14 +0100 (Mon, 05 Mar 2007) New Revision: 4714
Log: - Added visual tests for depth in 3d renderer Added: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartWithDepth.svg trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartWithSmallDepth.svg trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartWithDepth.svg trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartWithSmallDepth.svg Modified: trunk/Graph/tests/renderer_3d_test.php Added: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartWithDepth.svg =================================================================== (Binary files differ) Property changes on: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartWithDepth.svg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Name: svn:eol-style + native Added: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartWithSmallDepth.svg =================================================================== (Binary files differ) Property changes on: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderBarChartWithSmallDepth.svg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Name: svn:eol-style + native Added: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartWithDepth.svg =================================================================== (Binary files differ) Property changes on: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartWithDepth.svg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Name: svn:eol-style + native Added: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartWithSmallDepth.svg =================================================================== (Binary files differ) Property changes on: trunk/Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartWithSmallDepth.svg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Name: svn:eol-style + native Modified: trunk/Graph/tests/renderer_3d_test.php =================================================================== --- trunk/Graph/tests/renderer_3d_test.php 2007-03-05 13:48:48 UTC (rev 4713) +++ trunk/Graph/tests/renderer_3d_test.php 2007-03-05 14:51:14 UTC (rev 4714) @@ -896,6 +896,102 @@ ); } + public function testRenderLineChartWithSmallDepth() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphLineChart(); + $chart->palette = new ezcGraphPaletteBlack(); + + $chart->data['Line 0'] = new ezcGraphArrayDataSet( array( 'sample 1' => 432, 'sample 2' => 43, 'sample 3' => 65, 'sample 4' => 97, 'sample 5' => 154) ); + $chart->data['Line 0']->symbol = ezcGraph::NO_SYMBOL; + $chart->data['Line 1'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) ); + $chart->data['Line 1']->symbol = ezcGraph::NO_SYMBOL; + + $chart->renderer = new ezcGraphRenderer3d(); + $chart->renderer->options->depth = .01; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + + public function testRenderBarChartWithSmallDepth() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphBarChart(); + $chart->palette = new ezcGraphPaletteBlack(); + + $chart->data['Line 0'] = new ezcGraphArrayDataSet( array( 'sample 1' => 432, 'sample 2' => 43, 'sample 3' => 65, 'sample 4' => 97, 'sample 5' => 154) ); + $chart->data['Line 0']->symbol = ezcGraph::NO_SYMBOL; + $chart->data['Line 1'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) ); + $chart->data['Line 1']->symbol = ezcGraph::NO_SYMBOL; + + $chart->renderer = new ezcGraphRenderer3d(); + $chart->renderer->options->depth = .01; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + + public function testRenderLineChartWithDepth() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphLineChart(); + $chart->palette = new ezcGraphPaletteBlack(); + + $chart->data['Line 0'] = new ezcGraphArrayDataSet( array( 'sample 1' => 432, 'sample 2' => 43, 'sample 3' => 65, 'sample 4' => 97, 'sample 5' => 154) ); + $chart->data['Line 0']->symbol = ezcGraph::NO_SYMBOL; + $chart->data['Line 1'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) ); + $chart->data['Line 1']->symbol = ezcGraph::NO_SYMBOL; + + $chart->renderer = new ezcGraphRenderer3d(); + $chart->renderer->options->depth = .5; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + + public function testRenderBarChartWithDepth() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphBarChart(); + $chart->palette = new ezcGraphPaletteBlack(); + + $chart->data['Line 0'] = new ezcGraphArrayDataSet( array( 'sample 1' => 432, 'sample 2' => 43, 'sample 3' => 65, 'sample 4' => 97, 'sample 5' => 154) ); + $chart->data['Line 0']->symbol = ezcGraph::NO_SYMBOL; + $chart->data['Line 1'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) ); + $chart->data['Line 1']->symbol = ezcGraph::NO_SYMBOL; + + $chart->renderer = new ezcGraphRenderer3d(); + $chart->renderer->options->depth = .5; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testRender3dLineChartSmallMaxFontSize() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components