On 02/07/12 22:04, leowang wrote:
> I have a question of set fltk color.
> I use color(0x0) to set background color to black, but it display white to
> me, and if I use color(0x01010100), the display is black, so why 0x00000000
> is not black in fltk?
> my fltk version is 2.0, and my system's color bit 32bpp.
Hmm, yes, I can replicate in fltk2 current:
#include <fltk/Window.h>
#include <fltk/Widget.h>
#include <fltk/run.h>
using namespace fltk;
int main() {
Window *window = new Window(300, 180);
window->color(0x0);
window->show();
return run();
}
FLTK 1.x works fine, so either it's a bug,
or something odd about FLTK2.
Setting it to 0x1 makes it red (expected),
and the test/color_chooser shows the 0 color to be black,
so unless there's a weird reason, it should work.
Will wait for someone who knows FLTK2 better than I to reply.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk