[GRASS-dev] [GRASS GIS] #1283: PNG driver and Cairo driver mangle large symbols, XDRIVER doesn't

GRASS GIS trac at osgeo.org
Wed Feb 23 02:13:50 EST 2011


#1283: PNG driver and Cairo driver mangle large symbols, XDRIVER doesn't
---------------------+------------------------------------------------------
 Reporter:  hamish   |       Owner:  grass-dev@…              
     Type:  defect   |      Status:  new                      
 Priority:  major    |   Milestone:  6.4.1                    
Component:  Display  |     Version:  svn-develbranch6         
 Keywords:           |    Platform:  Linux                    
      Cpu:  x86-64   |  
---------------------+------------------------------------------------------
 Hi,

 in GRASS 6.x the PNG driver and Cairo driver badly mangle large ring
 symbols, while the XDRIVER doesn't. This makes the creation of
 automated PNG plots on a headless server somewhat problematic,
 unless the more tortuous ps.map + pstoimg method is used.

 (note even though it's headless it still needs X.org installed, as a
 dependency of the Cairo driver's X11-output option)

 The PNG driver has an uneven inner/outer radius and gouges out of it; the
 Cairo driver does not path the line segments together at all.

 examples images attached.

 {{{
 cat << EOF > test.grf
 width 30
 symbol basic/circle 500 50 50 red none
 EOF

 d.mon x4
 d.resize w=825 h=650
 d.graph test.grf

 xwd | xwdtopnm | pnmtopng > xdriver_ring.png
 d.out.file png_driver_ring
 d.out.file -c cairo_driver_ring
 }}}


 In GRASS 7 the situation is a bit better, the PS and one of the PNG|cairo*
 drivers(?) makes nice looking output, only complaint is that the closed
 ring has a sliver where it isn't closed. could a special beginning==end
 test be added to have it code the path?

 Also, is it possible to double or quadruple the number of vertices in the
 ring? At the current number it is very obviously a polygon and not a
 circle.

 {{{
 cat << EOF > test.grf
 width 30
 symbol basic/circle 500 50 50 red none
 EOF

 export GRASS_WIDTH=825
 export GRASS_HEIGHT=650

 export GRASS_RENDER_IMMEDIATE=PNG
 export GRASS_PNGFILE=png_driver7_ring.png
 d.graph test.grf


 export GRASS_RENDER_IMMEDIATE=CAIRO
 export GRASS_PNGFILE=cairo_driver7_ring.png
 d.graph test.grf

 export GRASS_RENDER_IMMEDIATE=PS
 export GRASS_PNGFILE=cairo_driver7_ring.ps
 d.graph test.grf
 }}}


 [*] I'm not sure which driver it's using actually, I get an identical
 output file for both. -- that is when setting 7's
 GRASS_RENDER_IMMEDIATE=PNG doesn't make d.graph SegFault, while the cairo
 driver doesn't. then I can tell.

 [**] should "GRASS_RENDER_IMMEDIATE=cairo" be uppercase or not? the man
 page shows both ways.


 thanks,
 Hamish

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1283>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list