diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 06:55:40 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 06:55:40 +0000 |
commit | 9e5906b3523afbfce28cb94d001967b195b4d55d (patch) | |
tree | f427cf74fd2f539c6d05bf361e09350aefcd25d1 | |
parent | 2b971feeaf028aa8025997ddb5616006bb0ad4d5 (diff) | |
download | zetacomponents-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-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/renderer/axis_label_rotated.php | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -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 ) * |