summaryrefslogtreecommitdiffstats
path: root/tests/driver_flash_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-04-05 09:26:22 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-04-05 09:26:22 +0000
commit0595ae170c3c418625f8d7ede4a878209fe7c869 (patch)
treec0331cf7868505359ecfea8dc4ba5f9de300c7ed /tests/driver_flash_test.php
parent7718b08b9e1e34023e6bfe20460c3a438349965c (diff)
downloadzetacomponents-graph-0595ae170c3c418625f8d7ede4a878209fe7c869.zip
zetacomponents-graph-0595ae170c3c418625f8d7ede4a878209fe7c869.tar.gz
- Implemented text rotation in flash driver
Diffstat (limited to 'tests/driver_flash_test.php')
-rw-r--r--tests/driver_flash_test.php89
1 files changed, 89 insertions, 0 deletions
diff --git a/tests/driver_flash_test.php b/tests/driver_flash_test.php
index 802cf3a..ba37091 100644
--- a/tests/driver_flash_test.php
+++ b/tests/driver_flash_test.php
@@ -598,6 +598,69 @@ class ezcGraphFlashDriverTest extends ezcGraphTestCase
);
}
+ public function testDrawTextBoxShortStringRotated10Degrees()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.swf';
+
+ $return = $this->driver->drawTextBox(
+ 'Short',
+ new ezcGraphCoordinate( 10, 10 ),
+ 150,
+ 70,
+ ezcGraph::LEFT,
+ new ezcGraphRotation( 10 )
+ );
+
+ $this->driver->render( $filename );
+
+ $this->swfCompare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.swf'
+ );
+ }
+
+ public function testDrawTextBoxShortStringRotated45Degrees()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.swf';
+
+ $return = $this->driver->drawTextBox(
+ 'Short',
+ new ezcGraphCoordinate( 10, 10 ),
+ 150,
+ 70,
+ ezcGraph::LEFT,
+ new ezcGraphRotation( 45, new ezcGraphCoordinate( 100, 50 ) )
+ );
+
+ $this->driver->render( $filename );
+
+ $this->swfCompare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.swf'
+ );
+ }
+
+ public function testDrawTextBoxShortStringRotated340Degrees()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.swf';
+
+ $return = $this->driver->drawTextBox(
+ 'Short',
+ new ezcGraphCoordinate( 10, 10 ),
+ 150,
+ 70,
+ ezcGraph::LEFT,
+ new ezcGraphRotation( 340, new ezcGraphCoordinate( 200, 100 ) )
+ );
+
+ $this->driver->render( $filename );
+
+ $this->swfCompare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.swf'
+ );
+ }
+
public function testDrawTextBoxLongString()
{
$filename = $this->tempDir . __FUNCTION__ . '.swf';
@@ -1106,6 +1169,32 @@ class ezcGraphFlashDriverTest extends ezcGraphTestCase
);
}
+ public function testDrawRotatedTextWithMinimizedBorderAndBackgroundTopLeft()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.swf';
+
+ $this->driver->options->font->border = ezcGraphColor::fromHex( '#555555' );
+ $this->driver->options->font->background = ezcGraphColor::fromHex( '#DDDDDD' );
+ $this->driver->options->font->minimizeBorder = true;
+ $this->driver->options->font->padding = 2;
+
+ $this->driver->drawTextBox(
+ 'Some test string',
+ new ezcGraphCoordinate( 10, 10 ),
+ 150,
+ 70,
+ ezcGraph::LEFT | ezcGraph::TOP,
+ new ezcGraphRotation( 15 )
+ );
+
+ $this->driver->render( $filename );
+
+ $this->swfCompare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.swf'
+ );
+ }
+
public function testDrawTextWithMinimizedBorderAndBackgroundMiddleCenter()
{
$filename = $this->tempDir . __FUNCTION__ . '.swf';
OpenPOWER on IntegriCloud