[GRASS5] D_color

Jachym Cepicky jachym.cepicky at centrum.cz
Tue May 17 08:00:05 EDT 2005


How to draw text to GRASS monitor?

I try this with

R_color(black);
R_set_window(t, b, l, r) ;
D_get_screen_window(&t, &b, &l, &r) ;

R_text_size(txsiz, txsiz);
R_move_abs(x0,y0);
strcpy(buff, "hallo world\n");
R_text(buff);

D_add_to_list(G_recreate_command());

but nothing is showen :-(

Thanks

Jachym


On Mon, May 16, 2005 at 05:01:55PM +0200, Jachym Cepicky wrote:
> Hallo developers,
> according to d.vect.thematic, I try to modify d.legend slightly, so it is
> useable for vector maps too.
> 
> Now I created structure 
> 
> struct vector_color {   /* color of vector files */
>             char *vcat;
>             int red;
>             int blue;
>             int green;
>         } vcolors[100];
> 
> which is able to save color values in R:G:B and category value for 100
> categories in the vector file.
> 
> d.legend uses
> 
>     int D_color(int color)
> 
> but how to set the (int color) value for it from R:G:B colors?
> 
> I don't know, if I can make d.legend work with vector files, but I try it :-)
> 
> Jachym

-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/




More information about the grass-dev mailing list