[GRASS-dev] ps.map rotate bug! + [d.out.file now talks to the PostScript driver]

Hamish hamish_nospam at yahoo.com
Thu May 17 08:03:41 EDT 2007


Glynn Clements wrote:
> > .ps format now includes "%%BoundingBox: 36 72 559 769"
> > (GRASS_PAPER=A4) which crops off the margins. Usually I'd expect the
> > BBox to be the full A4 range. Is this intentional?
> 
> BoundingBox refers to the actual graphics:
> 
> 	This comment specifies the bounding box that encloses all
> 	marks painted on all pages of a document. That is, it must be
> 	a "high water mark" in all directions for marks made on any
> 	page.


FWIW ps2epsi interprets this differently.
Given a .ps file made with the GRASS PS driver it will produce an
EPS file which has a bounding box of the full A4, "0 0 595 842".


Something else, not a big deal for printed material, but is for on-
screen reading:

ps2pdf13 of the .ps output doesn't respect PS driver DSC Landscape
hinting, the page is rot90ccw in Acroread (but intact).

In the past Acroread has correctly rotated ps.map -r landscape pages
to on-screen landscape mode using the same ps2pdf (regular "paper a4")
But then the orig ps.map output looks sideways in GV (reports Portrait
(no Ori DSC)). BBox is "0 0 595 841" for both rotated and non-rotated,
but somehow Acroread knows. Maybe Acroread rotates based on the best
text-up orientation?? (and the PS driver doesn't create text objects)

shrug. I guess the best we can do is go by the book and hope that other
softwares will do the same.




*** hey- #$%#!#@!! ps.map -r rotate flag is broken if you specify a
paper size! Without the "paper" instruction it works ok.

No wonder I couldn't understand why Markus needed to add a4-landscape
as a paper size.

If you don't use the "paper" instruction it defaults to a4 dimensions
and correctly rotates the map 90deg! If you specify the paper size it
does the rotation again, leaving you with the original page, but
sideways (still portrait but "up" is now to the left). argh.

"ps.map -r" to just rotate the page intact would be a pretty lame
option!


Fixed in 6.3cvs and backported to the 6.2 branch. I've removed the new
a4-landscape & a3-l paper sizes as they were only needed to work around
this bug. Added a note to the man page to lessen confusion in future.

Annoyed that I didn't notice this with ps.map/r_paper.c rev 1.3.


Hamish




More information about the grass-dev mailing list