summaryrefslogtreecommitdiffstats
path: root/src/renderer
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-10 06:55:40 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-10 06:55:40 +0000
commit9e5906b3523afbfce28cb94d001967b195b4d55d (patch)
treef427cf74fd2f539c6d05bf361e09350aefcd25d1 /src/renderer
parent2b971feeaf028aa8025997ddb5616006bb0ad4d5 (diff)
downloadzetacomponents-graph-9e5906b3523afbfce28cb94d001967b195b4d55d.zip
zetacomponents-graph-9e5906b3523afbfce28cb94d001967b195b4d55d.tar.gz
- Fixed issue #10747: axisLabelRotatedRenderer accesses unitialised variables
for Angles % 90 != 0 # Test case follows later
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/axis_label_rotated.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/renderer/axis_label_rotated.php b/src/renderer/axis_label_rotated.php
index 85ec300..2a1d3ce 100644
--- a/src/renderer/axis_label_rotated.php
+++ b/src/renderer/axis_label_rotated.php
@@ -174,7 +174,13 @@ class ezcGraphAxisRotatedLabelRenderer extends ezcGraphAxisLabelRenderer
$textAngle = $axisAngle +
deg2rad( $this->angle ) +
( $axis->position & ( ezcGraph::TOP | ezcGraph::BOTTOM ) ? deg2rad( 270 ) : deg2rad( 90 ) );
+
+ // Ensure angle between 0 and 360 degrees
$degTextAngle = rad2deg( $textAngle );
+ while ( $degTextAngle < 0 )
+ {
+ $degTextAngle += 360.;
+ }
$this->offset =
( $this->angle < 0 ? -1 : 1 ) *
OpenPOWER on IntegriCloud