Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.0

Bug #7454 Vertical axis title is shifted 180 degrees between SVG and PNG output
Submitted: 2006-04-21 13:02 UTC
From: wayne at ptaff dot ca Assigned: nosey
Status: Closed Package: Image_Canvas (version 0.7.2)
PHP Version: 4.4.0 OS: GNU/Linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-04-21 13:02 UTC] wayne at ptaff dot ca (Patrice Levesque)
Description: ------------ Using Image_Graph-0.72, Image_Canvas-0.3.0, php-4.4.0 with bundled gd with all options compiled in (freetype too). When generating a graph with PNG output and SVG output, the graphs are similar but the vertical axis title is reversed (I need to use a 90 degrees angle when generating PNG and 270 degrees when I generate SVG). This could be a bug in Image_Canvas, I'm not really sure. Test script: --------------- <?php $driver = 'png'; //$driver = 'svg'; include 'Image/Graph.php'; $canvas =& Image_Canvas::factory($driver, array('width' => 448, 'height' => 336, 'antialias' => 'driver')); $graph =& Image_Graph::factory('graph', $canvas); $dataset =& Image_Graph::factory('dataset'); $font =& $graph->addNew('font', 'verdana.ttf'); $graph->setFont($font); $graph->add(Image_Graph::vertical( Image_Graph::factory('title', array('foo', 12)), $plotarea = Image_Graph::factory('plotarea'), 5 )); $axisx =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_X); $axisx->setTitle('Bar'); $axisy =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); $axisy->setTitle('Baz', array('angle' => 90)); $dataset->addPoint(0, 0); $dataset->addPoint(1, 1); $plot =& $plotarea->addNew('line', &$dataset); $graph->done(); ?> Expected result: ---------------- This script works fine but when uncommenting line 3, the SVG output has the vertical axis title rotated 180 degrees. If I change the '90' to '270' in line 19, both graphs are similar. Actual result: -------------- Both graphs should look the same when given the same parameters.

Comments

 [2006-05-14 17:45 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!