#1333: ps.map mapinfo changes aligns to map
-----------------------------+----------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: minor | Milestone: 6.4.1
Component: Ps.map | Version: unspecified
Keywords: ps.map, mapinfo | Platform: All
Cpu: All |
-----------------------------+----------------------------------------------
When mapinfo is placed on the left side of map, ps.map will shift it to
the right to align it with the map. For example run this:
maploc 2 0[[BR]]
mapinfo [[BR]]
where 1 0[[BR]]
end[[BR]]
end
It's not as important, mapinfo is usually not placed as in this example.
But still it shouldn't behave so.
this is the cause, in ps/ps.map/map_info.c:
{{{
if (x < PS.map_left + margin)
x = PS.map_left + margin;
}}}
It then goes on to test if the map info box is within the map canvas
before determining the box width (based on length of text strings) so it
can use that as a basis for drawing the background box. (which explains
why background/border drawing only works within the map canvas)
Before just ripping that out, I'd like to understand why it was written
that way, as whoever wrote it really did want it to stay within the box.
ps_vlegend.c is very similar, and there I commented out that is-in-box
test some years ago so the border would work outside the box, but without
figuring out why it was like that in the first place.
any PostScript (as a programming language) experts in the house?