summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ChangeLog2
-rw-r--r--src/renderer/axis_label_rotated.php6
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a88d551..eab230e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
descriptive
- Fixed issue #10744: ExactAxisLabelRenderer shows last value at position of
second last value if showLastValue is disabled
+- Fixed issue #10747: axisLabelRotatedRenderer accesses unitialised variables
+ for Angles % 90 != 0
1.1beta1 - [RELEASEDATE]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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