Opened 14 years ago

Last modified 9 years ago

#1333 assigned enhancement

ps.map mapinfo aligns horizontally to map

Reported by: annakrat Owned by: hamish
Priority: minor Milestone: 6.4.6
Component: Ps.map Version: svn-develbranch6
Keywords: ps.map, mapinfo Cc: grass-dev@…
CPU: All Platform: All

Description

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
mapinfo
where 1 0
end
end

It's not as important, mapinfo is usually not placed as in this example. But still it shouldn't behave so.

Anna

Change History (5)

comment:1 by annakrat, 14 years ago

Summary: ps.map mapinfo changes aligns to mapps.map mapinfo aligns horizontally to map

comment:2 by martinl, 14 years ago

Milestone: 6.4.16.4.2

comment:3 by hamish, 14 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to hamish
Status: newassigned

comment:4 by hamish, 14 years ago

Version: unspecifiedsvn-develbranch6

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?

Hamish

comment:5 by neteler, 9 years ago

Milestone: 6.4.26.4.6
Note: See TracTickets for help on using tickets.