summaryrefslogtreecommitdiffstats
path: root/src/driver
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-06-02 08:07:37 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-06-02 08:07:37 +0000
commitf33ce6cab843a93c227464915d00e0580768d9d6 (patch)
tree28e801f9e390cd2625288b64ef0b5255af04300d /src/driver
parented1c86d6e19c1ec2255d0e76e914de035a961cae (diff)
downloadzetacomponents-graph-f33ce6cab843a93c227464915d00e0580768d9d6.zip
zetacomponents-graph-f33ce6cab843a93c227464915d00e0580768d9d6.tar.gz
- Added tests for axis labels
- Implemented axis labels
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/gd.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/driver/gd.php b/src/driver/gd.php
index 43276b4..1df035d 100644
--- a/src/driver/gd.php
+++ b/src/driver/gd.php
@@ -226,15 +226,15 @@ class ezcGraphGdDriver extends ezcGraphDriver
$boundings = imagettfbbox( $size, 0, $this->options->font, $string );
$position->y += $size;
- switch ( $align )
+ switch ( true )
{
- case ezcGraph::LEFT:
+ case ( $align & ezcGraph::LEFT ):
imagettftext( $image, $size, 0, $position->x, $position->y, $drawColor, $this->options->font, $string );
break;
- case ezcGraph::RIGHT:
+ case ( $align & ezcGraph::RIGHT ):
imagettftext( $image, $size, 0, $position->x + ( $width - $boundings[2] ), $position->y, $drawColor, $this->options->font, $string );
break;
- case ezcGraph::CENTER:
+ case ( $align & ezcGraph::CENTER ):
imagettftext( $image, $size, 0, $position->x + ( ( $width - $boundings[2] ) / 2 ), $position->y, $drawColor, $this->options->font, $string );
break;
}
OpenPOWER on IntegriCloud