[GRASS5] [bug #2776] (grass) d.text when interactive should say where to enter text

Hamish hamish_nospam at yahoo.com
Sun Dec 5 18:50:44 EST 2004


> >> this bug's URL: http://intevation.de/rt/webrt?serial_num=2776
> >> -------------------------------------------------------------------
> >> 
> >> $ d.text
> >> there is no comment seen in the "wish" window telling us to return
> >to> the terminal window and enter text.
> > 
> > true.  try  "echo `g.version` | d.text"
> > 
> > from the help page:
> > 
> > "DESCRIPTION
> >    d.text draws text in the active display frame on the graphics
> >    monitor. Text can be provided through standard input or
> >    redirected from a file (using the UNIX redirection mechanism)."
> > 
> > 
> > Yes, a text= option like d.text.freetype is missing.
> > Perhaps change the module's description until that is done?
> > 
> > I've been meaning to do further cleanups & sync'ing between d.text
> > and d.text.freetype for a while. Also merge in mouse placement from
> > d.barscale. It's not a high priority for me though.
>
> Should this be run in an xterm from the GUI instead of from a tcltk
> dialog?

I don't think this would help any.

The 5.0-5.4 tcltkgrass menu entry for d.text has an entry for input
file, which it pipes from stdin with "<":

interface_build {
    {d.text} 0
    {Draws text.}
    {entry size {Letters height in % of frame height (0-100) [5]:} 0 ""}
    {entry color {Text color [gray]:} 0 color}
    {entry line {Screen line number on which text will begin (1-1000) [1]:} 0 ""}
    {entry < {Text command file:} 0 file}
}


e.g.
d.text < input_file.txt

For short bits of text you might want to enter from the GUI there 
should be a text="your text here" option like d.text.freetype. But 
doing this is a little bit complicated because of the way d.text 
saves itself to the display's command history .. so it hasn't 
happened yet.

note d.text can do some fancy things with the correct commands, but I 
think it is better to leave that to advanced users piping from the 
command line.


Perhaps d.text should be removed from the d.m menu until we have a 
solution. (as it won't actually do anything)



Hamish




More information about the grass-dev mailing list