Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 30 - 21 = ?

 
 [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] nosey (Jesper Veggerby)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Fixed (rotated angle is now (angle+180)%360 which yields the same as GD) Bug "moved" to Image_Canvas