Ticket #1333 (assigned enhancement)

Opened 2 years ago

Last modified 2 years ago

ps.map mapinfo aligns horizontally to map

Reported by: annakrat Owned by: hamish
Priority: minor Milestone: 6.4.2
Component: Ps.map Version: svn-develbranch6
Keywords: ps.map, mapinfo Cc: grass-dev@…
Platform: All CPU: 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

Changed 2 years ago by annakrat

  • summary changed from ps.map mapinfo changes aligns to map to ps.map mapinfo aligns horizontally to map

Changed 2 years ago by martinl

  • milestone changed from 6.4.1 to 6.4.2

Changed 2 years ago by hamish

  • cc grass-dev@… added
  • owner changed from grass-dev@… to hamish
  • status changed from new to assigned

Changed 2 years ago by hamish

  • version changed from unspecified to svn-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

Note: See TracTickets for help on using tickets.