Page 1 of 1

make invisible a part of parent widget

Posted: Wed Jul 20, 2011 02:34
by metylbk
Hi!
I have a frame window with green background. I add a staticImage to the framewindow. The StaticImage is quite transparent, but it overlaps on a part of framewindow, so that it becomes not transparent as my will. How can make a part of windowframe where the staticimage overlaps invisible (or transparent)?
Thanks!
What I want:
Image http://up.anhso.net
The fact:
Image http://up.anhso.net
(Don't care about character, I just didn't add character in picture 2)

Re: make invisible a part of parent widget

Posted: Wed Jul 20, 2011 10:47
by Ident
What?

Re: make invisible a part of parent widget

Posted: Wed Jul 20, 2011 11:09
by Kulik
Even with InheritAlpha = false the frame would have to have a transparent spot at the right place for this to work.

Re: make invisible a part of parent widget

Posted: Wed Jul 20, 2011 18:32
by Mikademus
Ident wrote:What?

The OP is asking about how to make an area of the window translucent. The first picture is how he wants it to look with the background slightly visible behind the character. The second picture is what he has at the moment with an opaque frame instead.

Re: make invisible a part of parent widget

Posted: Thu Jul 21, 2011 09:45
by metylbk
Do I have to draw a framewindow exactly what I want? (there is a transparent area at the top right of frame). Can't I achieve what I want by coding?

Re: make invisible a part of parent widget

Posted: Fri Jul 22, 2011 19:57
by Kulik
To be honest I am not sure, I don't think so though. I think the most compatible solution (with most GPUs) is to have the frame window's background transparent at the place you want and put image on top of it. Perhaps you could do this with RTTs and overwriting pixels but off the top of my head I have no idea :-)

Re: make invisible a part of parent widget

Posted: Mon Jul 25, 2011 18:44
by Jamarr
I think you would have to make the entire frame-window transparent and then add opaque child-widgets (panels) where you do not want the transparency. You will probably also have to tweak the frame-window definition in the looknfeel (probably want to derive a new frame-window type for this) and make sure the titlebar and frame components of the window are opaque; this way only the client area is transparent.

The other option is to use RTT and render the background + model onto the texture to give the illusion of a transparent sub-window.

p.s. I think Kulik was suggesting similar ideas, but it was kind of vague so I was not completely sure ;)