On 09.02.2012 04:28, leowang wrote:

> But I have a question about Fl_Shared_Image, my code is like the following:
>
> int main(int argc, char ** argv) {
>      fl_register_images();
>      Fl_Window *window = new Fl_Window(0, 0, 1280, 800);
>      window->image(Fl_Shared_Image::get("test.bmp"));
>
>    window->show(argc,argv);
>
>    return Fl::run();
> }
>
> But when I run the program in my arm board, it only display white but not the 
> test.bmp. I can sure the test.bmp is in the correct position.

Please post complete and compileable code (include headers etc.) so
that willing people here can compile your code easily. This will
raise the chances that someone compiles it and tries to help you.

Does your code work on a normal PC? If yes, which OS? If no,
how would it work on your arm board? And what OS is your
arm board? Lots of questions.

> Can anyone tell my why? Thanks.

Really only with compileable code (lack of time otherwise), but
since the image() will be drawn as (part of) the label (at least
in FLTK 1.x - this may be different than in FLTK 2), this is
likely not to work this way. I suggest to add a box to the window,
use the label alignment "centered and inside" (off the top of my head:
FL_ALIGN_INSIDE|FL_ALIGN_CENTER), and see if this works.

If not, please post your code, as said above...

Albrecht
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to