md houssy wrote:
> 
> I try to have a transparent background for my GUI, but setting the
> boxtype of the window to FL_NO_BOX  just display the last image and
> it isn't dynamic !

That seems about right - as I said in my previous post, the FL_NO_BOX 
type does not make the window elements transparent, it simply means they 
do not redraw their backgrounds.

Under some circumstances, that can be equivalent to transparent, but 
clearly not in the general case. And in particular, as you point out, 
since the background is not being redrawn at all, it will not be dynamic.

> how can I get a transparent background ?

You need to create a window that has a transparent alpha channel - fltk 
does not provide that ability by default.
You will also need a window manager that is able to composite windows 
for display to allow the transparency to function. That is beyond to 
scope of fltk entirely and you will need to investigate whether the WM 
you are using is even capable of that - most are not, though it is 
becoming more common these days.

> do I have to call system commands ? 

Most probably - though someone may know of a trick to get window 
transparency in fltk directly. I do not know of such a trick however...

> if yes can some one show me an example?

Not easily - how to do this varies very much from platform to platform. 
Even if you do devise a working solution it is unlikely to be portable 
(e.g. what works under gnome mostly will not work under KDE, etc... and 
OSX and winXX are a whole other problem.)

And you have not told us what system you are targetting, or given any 
hint of what ot is you are actually trying to do. If you tell us what 
you want to achieve, someone may know a way to get to that destination 
without making system calls that will not be portable.

> Also any help about resizing image in fltk is appreciated :D
> thank you !!!


Did you look at the pixmap_browser demo? Do you see how it handles image 
re-sizing by use of the image->copy() method? That's the easiest way, 
but may give poor results over time,
Anything more elaborate is going to require that you process the image 
data yourself using one of the many image processing libs available on 
the internet, and use that to rescale your images as "losslessly" as 
possible, But the "how" of doing that is beyond the scope of this forum, 
I'm afraid.

This howto shows how to get at the raw image data for processing:

http://www.fltk.org/articles.php?L468

And this one shows how to use antigrain image lib with fltk to 
manipulate images:

http://www.fltk.org/articles.php?L898

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

Reply via email to