PDA

View Full Version : argb windows and blur



kernel_panic
13th August 2007, 11:33
everyone of you knows the aero style from vista, or?
i want to the same with my skin-classes for qt. i've found a real nice and fast blur-algorithm on the trolltech lab, but i have no idea how to blur just that whats behind the window.
can anyone help me?

marcel
13th August 2007, 11:51
I am not sure.
UpdateLayeredWindow composes the image you set with the background.

On Vista, with Aero enabled, the DWM takes care of compositions. Everything is painted in a back buffer and there it is preprocessed ( windows get shadows, and also the blur is applied ).

Regards

kernel_panic
13th August 2007, 12:05
isn't it possible to get the back of the widget? only the part behind the widget, without hiding it and grabbing the desktop? do you understand what i mean?

marcel
13th August 2007, 12:22
Yes, I understand :).
But I am not sure if you can find an optimal method to do that.

I assume you also want live updates. This means if you have a movie playing in the back of your transparent window, then you should see the movie.
This happens with your current implementation.

I think you can get a "screenshot" of what's behind your window each time you get a paintEvent.
But painting, blurring and taking the screenshot take some time, and paint events can arrive quite often, so I am not sure how fast it will get.


Regards

kernel_panic
13th August 2007, 12:41
hm, how can i get a screenshot of the widgets back? i don't want to hide the window, take screenshot and show it again.i tried this and it's very ugly....
isn't there a windows-api funktion for this?

first i want to know if it's possible and try it. than i look if it's too slow and can update the window only on special events, like focused or showing or moving.

short, the next thing what i need is the widgets back. however without hide the window, take screenshot and show it again.

kernel_panic
13th August 2007, 15:51
check this, do you mean it's ok?
qt shoots throug WS_LAYERED_EX windows...

marcel
13th August 2007, 16:52
:)
Nice, but I told you it is going to move harder. Actually, I think Vista moves a little faster on my computer( and it is not much, believe me ).

Nevertheless, it is an excellent tool. Maybe guys with powerful computers will embed it in their apps.

Anyway, I prefer the other version, without blurring.

Regards