[GRASS5] Re: [GRASSLIST:3781] minor update to tcltkgrass for GRASS 5.7

Hamish hamish_nospam at yahoo.com
Tue Jun 29 23:23:18 EDT 2004

> I ran into a couple errors in tcltkgrass and corrected them.

> The errors prevented the following programs from starting:
> d.barscale
> d.scale
> I also made d.out.png modal

d.scale is superseded by 'd.barscale -l' and doesn't exist in GRASS 5.7.
I've updated menu.tcl in cvs.

Additionally, d.barscale's GUI isn't rendering properly. When you open
it, the bcolor= and at= descriptors are missing, and the following error
is displayed on the console:

extra characters after close-quote
bad window path name ".pw.f0.frame.optwin.fra.frame.lab1"
invalid command name "0,0"
bad window path name ".pw.f0.frame.optwin.fra.frame.lab3"

It is choking on the " character in bcolor=; if I change the module to
use ' instead, it works.. this will break d.text.freetype as well.

Similarly, at= breaks when it sees [], that happens in d.text as well.

It would be nice if the parser be a bit more robust to handle "[].
Are there other chars which will break it as well? {}?

[d.barscale] Parameters:

  bcolor   Background color, either a standard GRASS color, R:G:B
             triplet, or "none"
           default: white

  tcolor   Text color, either a standard GRASS color or R:G:B triplet
             (separated by colons)
           default: black

      at   The screen coordinates for top-left corner of label ([0,0] is
             top-left of frame)
           options: 0-100
           default: 0.0,0.0

Once again, I'd like some feedback on if [0%,0%] should be standardized
as top left or bottom left of the frame. As it is, we use both.
See 'd.text.freetype -p -n' for an example.. In that case, I vote for
removing -p altogether.

I vote for bottom-left when we are talking about percentage of frame,
which is what I think we should be using for screen coordinates most of
the time, except for labels. 5.7's d.vect deals with labels pretty well

btw, d.text from the GUI doesn't work right now as it gets its input
from stdin. I've been meaning to add a text="" option like
d.text.freetype has, but there's still the gui quoting problem for
multiple words. I've also been meaning to update d.text and
d.text.freetype to use the mouse positioning code from d.barscale which
works nicely, but haven't gotten to it yet.


More information about the grass-dev mailing list