[GRASS5] all color in vectors and areas
Fernando Pacheco
fpacheco at adinet.com.uy
Fri Apr 6 15:46:21 EDT 2001
Eric:
I'm a beginner programmer in C.
I don't use scanf because my users are very inattentive so one user can use
R123G12B122, other user can pass -123|12|122, other user can write
((((123-||12-o-122),... I want to use a graphical interface for RGB colors
then only one format will be used.
Now I want to modify the width of the lines in vectors and areas. Thank
you. Fernando Pacheco.
On Fri, 30 Mar 2001 12:12:56 Eric G. Miller wrote:
> On Fri, Mar 30, 2001 at 12:15:53AM -0800, Eric G. Miller wrote:
> > On Fri, Apr 06, 2001 at 01:53:06AM -0300, Fernando Pacheco wrote:
> > > Hello:
> > > I write a function D_translate_color_to_RGB(char *) in
> > > src/libes/display/tran_color.c to translate user input string like
> > > indigo or magenta or grey or 255,0,127 or (((255|0|||127)-- or
> > > somestring255somestring0somestring127somestring to typedef RGB
> defined
> > > in src/include/color.h then I can use all the colors in vectors
> > > (d.vect) and areas (d.area). I'm sending to you my 2 new files, and a
> > > d.area using the new library function. The function can substitute
> the
> > > D_translate_color.
> > >
> > > I'm not a experience C program but my users like the new colors.
> > > Fernando Pacheco.
> >
> > Thanks for your effort. Couple things I noticed in your function:
> >
> > Use of C++ style comments. AFAIK, these are allowed in ISO C99, but
> > many older compilers will choke. Second (and worse) you are returning
> a
> > locally scoped variable. This may work on some systems, but on others
> > it will (and properly should) cause a segfault:
>
> I'm a moron. Ignore this nonsense. Plain structures return fine.
> Note to self: Go to sleep when tired!
>
> --
> Eric G. Miller <egm2 at jps.net>
>
> ----------------------------------------
> If you want to unsubscribe from GRASS Development Team mailing list write
> to:
> minordomo at geog.uni-hannover.de with
> subject 'unsubscribe grass5'
>
>
>
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list