Opened 8 years ago
Closed 8 years ago
#3121 closed defect (fixed)
d.barscale and northarrow positioning problem when off-screen rendering
Reported by: | kuszinger | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.0 |
Component: | Display | Version: | svn-trunk |
Keywords: | d.northarrow, d.barscale | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
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
Attachments (3)
Change History (11)
by , 8 years ago
Attachment: | error_attachment.jpg added |
---|
by , 8 years ago
Attachment: | test_script.sh added |
---|
test script for developers / testers - for nc_spm_08_grass7 location
comment:1 by , 8 years ago
I've uploaded a test script (shell, Linux). It should be run in the nc_spm_08_grass7 location. Creates two examples showing the effect. See sample_fullpage and sample_mapwindow bmp files.
comment:3 by , 8 years ago
comment:4 by , 8 years ago
Tested on:
[kuszi@kuszidell trunk]$ svnversion
69103
Result: OK. See latest attachment jpg. Barscale shows the same location when running with margin or without as well.
Thanks, great.
comment:8 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Demonstration for off screen rendering "margin" - "ofset" effect