XForms: Colormap.

From: Yann Guichoux (guichoux@shom.fr)
Date: Fri May 12 2000 - 08:44:04 EDT

  • Next message: Steve Lamont: "Re: XForms: Colormap."

    # To subscribers of the xforms list from Yann Guichoux <guichoux@shom.fr> :

    Hi,
    I've got a problem (yep, another one...) with color allocation.
    here is a piece of code i wrote :

    for (i=0;i<100;i++)
    {
            colors[i]=IDCOL1+i;
    }

    fl_free_colors(&colors[0],100);

    for (i=0; i<100; i++)
    {
            red=a_value_less_than_255;
            green=a_value_less_than_255;
            blue=a_value_less_than_255;
            fl_macolor(IDCOL1+i,red,green,blue);
            fl_getmcolor(IDCOL1+i,&rTest,&gTest,&bTest);
            if (red!=rTest || green !=gTest || blue !=bTest)
            {
                    fprintf(stderr,"bad Alloc !\n");
            }
    }

    my problem is that some colors are not well allocated by this way...and
    i don't know why..

    thanks for any help ...
    YG
    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Fri May 12 2000 - 09:05:05 EDT