summaryrefslogtreecommitdiffstats
path: root/src/renderer
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2009-07-04 11:07:54 +0000
committerKore Nordmann <github@kore-nordmann.de>2009-07-04 11:07:54 +0000
commite6a99f5e5a8c6e5ea43ebc0ca7d994f2d6c4a689 (patch)
treefd4280250e3bdd2562ef72e46eca8f715f0b6ff0 /src/renderer
parentadc30f0247f83feb0300b6e1c64dfead4e059c3e (diff)
downloadzetacomponents-graph-e6a99f5e5a8c6e5ea43ebc0ca7d994f2d6c4a689.zip
zetacomponents-graph-e6a99f5e5a8c6e5ea43ebc0ca7d994f2d6c4a689.tar.gz
- Implemented: #14294: Add option for axis label rotation
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/2d.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/renderer/2d.php b/src/renderer/2d.php
index 082f2c3..4cb5ce0 100644
--- a/src/renderer/2d.php
+++ b/src/renderer/2d.php
@@ -1425,7 +1425,11 @@ class ezcGraphRenderer2d
),
$width * ( 1 - $axis->axisSpace * 2 ) - $axis->labelMargin,
$axis->labelSize,
- ezcGraph::TOP | ezcGraph::RIGHT
+ ezcGraph::TOP | ezcGraph::RIGHT,
+ new ezcGraphRotation( $axis->labelRotation, new ezcGraphCoordinate(
+ $position->x + $axis->labelSize / 2,
+ $position->y - $axis->labelSize / 2
+ ) )
);
break;
case ezcGraph::BOTTOM:
@@ -1437,7 +1441,11 @@ class ezcGraphRenderer2d
),
$width * ( 1 - $axis->axisSpace * 2 ) - $axis->labelMargin,
$axis->labelSize,
- ezcGraph::TOP | ezcGraph::LEFT
+ ezcGraph::TOP | ezcGraph::LEFT,
+ new ezcGraphRotation( $axis->labelRotation, new ezcGraphCoordinate(
+ $position->x + $axis->labelSize / 2,
+ $position->y + $axis->labelSize / 2
+ ) )
);
break;
case ezcGraph::LEFT:
@@ -1449,7 +1457,11 @@ class ezcGraphRenderer2d
),
$width - $axis->labelMargin,
$axis->labelSize,
- ezcGraph::BOTTOM | ezcGraph::RIGHT
+ ezcGraph::BOTTOM | ezcGraph::RIGHT,
+ new ezcGraphRotation( $axis->labelRotation, new ezcGraphCoordinate(
+ $position->x - $axis->labelSize / 2,
+ $position->y - $axis->labelSize / 2
+ ) )
);
break;
case ezcGraph::RIGHT:
@@ -1461,7 +1473,11 @@ class ezcGraphRenderer2d
),
$width - $axis->labelMargin,
$axis->labelSize,
- ezcGraph::BOTTOM | ezcGraph::LEFT
+ ezcGraph::BOTTOM | ezcGraph::LEFT,
+ new ezcGraphRotation( $axis->labelRotation, new ezcGraphCoordinate(
+ $position->x + $axis->labelSize / 2,
+ $position->y - $axis->labelSize / 2
+ ) )
);
break;
}
OpenPOWER on IntegriCloud