[GRASS-dev] [GRASS GIS] #3121: d.barscale and northarrow positioning problem when off-screen rendering

GRASS GIS trac at osgeo.org
Sat Aug 6 14:03:01 PDT 2016


#3121: d.barscale and northarrow positioning problem when off-screen rendering
--------------------------------------+-------------------------
 Reporter:  kuszinger                 |      Owner:  grass-dev@…
     Type:  defect                    |     Status:  new
 Priority:  normal                    |  Milestone:  7.2.0
Component:  Display                   |    Version:  svn-trunk
 Keywords:  d.northarrow, d.barscale  |        CPU:  Unspecified
 Platform:  Unspecified               |
--------------------------------------+-------------------------
 If GRASS rendering environment is set to work to file:

 {{{
 os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
 os.environ['GRASS_RENDER_FILE_READ'] = 'TRUE'
 os.environ['GRASS_RENDER_TRANSPARENT'] = 'TRUE'
 os.environ['GRASS_RENDER_FILE_COMPRESSION'] = '0'
 os.environ['GRASS_RENDER_FILE_MAPPED'] = 'TRUE'
 os.environ['GRASS_RENDER_WIDTH'] = '3000'
 os.environ['GRASS_RENDER_HEIGHT'] = '2000'
 }}}
 and rendering into a window on this area:
 {{{
 os.environ['GRASS_RENDER_FRAME'] = '248,1063,187,1567'
 }}}
 (or other sub-window)

 barscale and especially northarrow displays at weird locations.
 Grid rendering is OK and raster legend seems to behave ok (being at ~ same
 percent as on screen)

 It seems to be a ofset problem. There is a sample attached with several
 images. Rendering commands are always the same. The only difference is
 that if it happens to screen or file and in the second case
 GRASS_RENDER_FRAME is smaller (= bigger margin).

 barscale rendering:

 {{{
 d.barscale style="full_checker" at="44.3,10.3" label="m" bgcolor="none"
 }}}

 northarrow:
 {{{
 d.northarrow style="basic_compass" at="82.6,22.4" label="E"
 color="139:105:20" fill_color="139:105:20"
 }}}

 It seems that northarrow and barscale rendered somehow without the "left
 margin" so there could be a kind of ofset problem in the rendering area.

 I do understand that northarrow and barscale positioning percentages are
 for the whole screen ( = file in this case).
 Also when reaching the edge of GRASS_RENDER_FRAME edge is reached by this
 map gadgets, they are cut and not drawn outside this GRASS_RENDER_FRAME.

 Positioning of raster legend should be compared to these modules to find
 the difference.

 Detected also 7.0.4, 7.2 and 7.3 weekly snapshot versions, 7.2 named in
 ticket

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3121>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list