[GRASS5] rgb color support in ps.map ?
hamish_nospam at yahoo.com
Wed Aug 31 20:39:29 EDT 2005
> I wouldn't call myself "desperate" ;-), but in the effort of
> creating a ps.map version of the legend created by d.vect.thematic
> it would be necessary for the rectangle object...
Ok, I looked at doing that but specifically didn't add it to the
rectangle instruction when I was working with that instruction some
weeks ago for two reasons:
a) I had been thinking about it as a backdrop to draw things on, not as
a foreground object itself. Basic solid colors are usually what is
wanted in this case. I now see that people might want to use the
rectangle command for foreground objects too, and a background color of
"none" would also be useful.
b) Changing it would mean changing the format of the plotting file
(add_to_plfile()). I didn't know if this was just an internal ps.map
thing or had links to other paint commands and so was a bit loath to
make a change which would break something else.
For what you want to do, I would think it better not to use a filled
'rectangle' but rather use the 'point' command to place an icon of type
basic/box at the x% y%. Looking at the code I see I didn't change this
one either re. RGB due to the same plotfile format change. I am more
motivated to fix this first.
I though there was a message by me in the mailing list archives from
mid-June on this but it eludes my searches.
> I also think that ideally ps.map should have a consistent behaviour
> across all elements, but that's easy to say while I depend on other
> to do it ;-)
A worthy goal, for all of GRASS.
> You can also try to briefly explain what needs to be done, and I'll
> have a first attempt at doing it myself...
It isn't that hard to do, copying in Radim's vector RGB parsing into
ps/ps.map/r_plt.c from eg r_vlines.c and then the code that reads the
plotfile is all.
The question is if we can change the format of that plot file during
6.1. I don't know the answer to that. If it is ok I am happy to do the
changes as I already know the ps.map code and have been the one doing
the RGB updating in the display modules. Updating the display modules
has often been more of a hack than I'm happy with, but I think I have my
head around how far & where to push that. But RGB support is better
written into the ps.map code vs. the display driver so it isn't really a
problem in this case.
More information about the grass-dev