summaryrefslogtreecommitdiffstats
path: root/tests/renderer_3d_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-08-25 01:20:36 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-08-25 01:20:36 +0000
commit4e50ab6291dc2430ef9ce4cc42c100c021e1a3b0 (patch)
treeb476fac1f2f6caf72c476fa2cb71d496878d911f /tests/renderer_3d_test.php
parent5298e85976086eeaac3517c359e41f2c2ee444d5 (diff)
downloadzetacomponents-graph-4e50ab6291dc2430ef9ce4cc42c100c021e1a3b0.zip
zetacomponents-graph-4e50ab6291dc2430ef9ce4cc42c100c021e1a3b0.tar.gz
- Pimped pie charts
Look at Graph/tests/data/compare/ezcGraphRenderer3dTest_testRenderLabeledPieSegmentWithGleamAndShadow.svg # Caused by a 25h travel from Dortmund to Vancover and commited on an open # WLAN in Osoyoos in Okanagan Valley, Canada
Diffstat (limited to 'tests/renderer_3d_test.php')
-rw-r--r--tests/renderer_3d_test.php71
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php
index 908026a..e7b99f3 100644
--- a/tests/renderer_3d_test.php
+++ b/tests/renderer_3d_test.php
@@ -351,6 +351,77 @@ class ezcGraphRenderer3dTest extends ezcTestCase
);
}
+ public function testRenderLabeledPieSegmentWithGleamAndShadow()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $chart = new ezcGraphPieChart();
+ $chart->data['sample'] = new ezcGraphArrayDataSet( array(
+ 'Mozilla' => 4375,
+ 'IE' => 345,
+ 'Opera' => 1204,
+ 'wget' => 231,
+ 'Safari' => 987,
+ ) );
+
+ $chart->data['sample']->highlight['Safari'] = true;
+ $chart->data['sample']->color['Safari'] = '#000000';
+ $chart->data['sample']->highlight['IE'] = true;
+
+ $chart->renderer = new ezcGraphRenderer3d();
+
+ $chart->renderer->options->pieChartShadowSize = 10;
+ $chart->renderer->options->pieChartGleam = .5;
+ $chart->renderer->options->dataBorder = false;
+ $chart->renderer->options->pieChartHeight = 16;
+
+ $chart->renderer->options->pieChartOffset = 180;
+
+ $chart->driver = new ezcGraphSvgDriver();
+ $chart->render( 500, 200, $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
+
+ public function testRenderLabeledPieSegmentWithGleamAndShadowGD()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.png';
+
+ $chart = new ezcGraphPieChart();
+ $chart->data['sample'] = new ezcGraphArrayDataSet( array(
+ 'Mozilla' => 4375,
+ 'IE' => 345,
+ 'Opera' => 1204,
+ 'wget' => 231,
+ 'Safari' => 987,
+ ) );
+ $chart->options->font->path = dirname( __FILE__ ) . '/data/font.ttf';
+
+ $chart->data['sample']->highlight['Safari'] = true;
+ $chart->data['sample']->color['Safari'] = '#000000';
+ $chart->data['sample']->highlight['IE'] = true;
+
+ $chart->renderer = new ezcGraphRenderer3d();
+
+ $chart->renderer->options->pieChartShadowSize = 10;
+ $chart->renderer->options->pieChartGleam = .5;
+ $chart->renderer->options->dataBorder = false;
+ $chart->renderer->options->pieChartHeight = 16;
+
+ $chart->renderer->options->pieChartOffset = 180;
+
+ $chart->driver = new ezcGraphGdDriver();
+ $chart->render( 500, 200, $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.png'
+ );
+ }
+
public function testRenderLabeledPieSegmentWithTitle()
{
$filename = $this->tempDir . __FUNCTION__ . '.svg';
OpenPOWER on IntegriCloud