[GRASS-dev] GUI toolkits [-> ps.map CMYK]

Glynn Clements glynn at gclements.plus.com
Tue May 30 09:10:22 EDT 2006


Hamish wrote:

> > I can't even begin to calculate the number of hours I've spent f***ing
> > around with labels and colours in drawing programs because the output
> > from the GIS programs was so bad. In the realm of free software,
> > generating a quality map is similarly difficult if not worse.
> 
> ps.map is a pain as you usually need to use the trial & error method.
> Results are consistent and (hopefully) as expected, however, which is a
> major plus. Hopefully in the future Jachym's g-ps.map (or GUI equivalent)
> will make ps.map just a behind-the-scenes engine for generating the
> plots.
> 
> FWIW, I think ps.map output is just wonderful once you get the hang of it.
> 
> > psmap is not bad, but it doesn't do process colours, so it can't be
> > used for publishing without extra processing.
> 
> I'll take a patch for a CMYK flag.
> 
> I thought that some months ago Glynn outlined what needed to happen
> (level 3 PS?),

Technically, colour is a level 2 feature, although some level 1
printers have the colorimage operator. All level 2 implementations
support CMYK, although the "level 1 + colour" implementations usually
only support RGB.

Whether RGB or CMYK is used only matters if you intend to decompose
the PostScript file with e.g. Illustrator. For printing, the
PostScript implementation will convert RGB to CMYK (all hardcopy
devices use CMYK for the actual printing).

We shouldn't be making ps.map do its own RGB->CMYK conversion;
PostScript will do a much better job of it. In particular, a
PostScript printer can adjust the conversion to match the printer (or
even a specific set of inks/toners).

Even if ps.map used ICC colour profiles, you would still have to
choose a specific profile at the time that the file was created,
meaning that the colours would only be accurate for a specific
printer.

> The other thing that really needs to happen with ps.map is for all
> decorations to accept inches from the top-left of the page or percentage
> of the map window (from bottom-left) placement coordinates.
> 
> And before anyone suggests it, I think it a very bad idea to try and do
> metric values for ps.map placement coordinates. PostScript lives in a
> world of inches (font size of 10 is exactly 10/72")

Everything in PostScript uses the current transformation matrix. The
default setting has the origin at the lower left with one unit equal
to 1/72" (one point, for some definitions of "point"). If you apply a
scaling, it affects everything, including font sizes.

There's no reason why you couldn't apply a scaling of 72/25.4 so that
all coordinates were in mm, but then you would have to specify font
sizes in mm also.

OTOH, if the input format uses something other than points for
coordinates, you have to apply a scale factor, so it doesn't really
matter whether you use inches and scale by 72 or mm and scale by
72/25.4.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list