[GRASS5] rgb color support in ps.map ?

Moritz Lennert mlennert at club.worldonline.be
Thu Sep 1 05:13:51 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hamish wrote:
>>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.

That sounds perfect to me.


> 
> I though there was a message by me in the mailing list archives from
> mid-June on this but it eludes my searches.

Actually you filed a bug report:
http://intevation.de/rt/webrt?serial_num=3398&display=History
(mailing list:
http://grass.itc.it/pipermail/grass5/2005-July/018895.html)

> 
>>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.
> 

If you are willing to implement it for the points element then I
won't touch the code, and I don't think doing so will break anything
(people will be able to continue to use color names, or ?), so it
shouldn't be a problem to do it in 6.1, or ?

Thanks !

Moritz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDFsZPrIrMbm76jD8RAkq7AJ9wQInPseVdwIHwA9ESo3ra+BxH+QCeM8Yz
CpZ8NIauUGthfL0KwhSnpW8=
=ehzW
-----END PGP SIGNATURE-----




More information about the grass-dev mailing list