I get a strange behavior. Shouldn't

window->color(fl_rgb_color( 50) );

and

window->color(50);

give the same color?


Try this:

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>

int  main(int argc, char ** argv)
{
        Fl_Window *window;
        Fl_Box *box;

        window = new Fl_Window(300, 180);
        window->color(50);
        box = new Fl_Box(20, 40, 260, 100, "Hello World!");
        box->box(FL_UP_BOX);
        box->labelsize(36);
        box->color(fl_rgb_color(50));
        box->labelfont(FL_BOLD+FL_ITALIC);
        box->labeltype(FL_SHADOW_LABEL);
        window->end();
        window->resizable(window);
        window->show(argc, argv);
        return(Fl::run());
}

Am I wrong?
I want to get the r, g, b color of a 8 bit color. I should change the 8bit to 
24bit so I can retrieve them ..

Regards
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to