summaryrefslogtreecommitdiffstats
path: root/tests/driver_gd_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-10-04 11:51:12 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-10-04 11:51:12 +0000
commita39691f135871fd24f67eb121278a82f9318a756 (patch)
treee66ee31d0697a44cbdd5db499bde53e8a4e38aa0 /tests/driver_gd_test.php
parent1e353d95ac3c8902d7103e35db48297de0513e33 (diff)
downloadzetacomponents-graph-a39691f135871fd24f67eb121278a82f9318a756.zip
zetacomponents-graph-a39691f135871fd24f67eb121278a82f9318a756.tar.gz
- Make text background working in gd driver with activated supersampling
Diffstat (limited to 'tests/driver_gd_test.php')
-rw-r--r--tests/driver_gd_test.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/driver_gd_test.php b/tests/driver_gd_test.php
index 54a05f0..726afea 100644
--- a/tests/driver_gd_test.php
+++ b/tests/driver_gd_test.php
@@ -1652,6 +1652,37 @@ class ezcGraphGdDriverTest extends ezcImageTestCase
);
}
+ public function testDrawTextWithBackgroundAndSupersampling()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.png';
+
+ $this->driver->options->supersampling = 2;
+ $this->driver->options->font->background = ezcGraphColor::fromHex( '#DDDDDD' );
+ $this->driver->options->font->minimizeBorder = false;
+
+ $this->driver->drawTextBox(
+ 'Some test string',
+ new ezcGraphCoordinate( 10, 10 ),
+ 150,
+ 70,
+ ezcGraph::LEFT | ezcGraph::MIDDLE
+ );
+
+ $this->driver->render( $filename );
+
+ $this->assertTrue(
+ file_exists( $filename ),
+ 'No image was generated.'
+ );
+
+ $this->assertImageSimilar(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.png',
+ 'Image does not look as expected.',
+ 2000
+ );
+ }
+
public function testDrawTextWithBorder()
{
$filename = $this->tempDir . __FUNCTION__ . '.png';
OpenPOWER on IntegriCloud