[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Transparent Pygame Windows?
Hi again,
i don't think it is possible through pygame / SDL directly.
Especially as, i think i remember from your last post, you're using X on
a non - M$ - OS.
I think there were always problems with transparent windows in X,
because of the X server / client model, most terminal emulators use a
copy of the root window as a base for their transparency (no other
windows are seen in between the terminal and the bg).
The way to go, i guess, would be to get a screenshot into your program
somehow, on MS-Win through the Win - API, i guess, and in X ... i don't
know.
Then you could take your window's position and size on the screen as an
offset in the copy of the screenshot, blit this rectangle as a base
image in your pygame - window and blit another surface with alpha -
effects added onto it. It would be quite complicatet, i guess,
especially if you want to do it portable, as you'd have to use API -
calls to the Environment you're on, eg. Windows, X, OS/X, whatever.
That's the only way i'd say it would be possible. I don't know if this
work (getting a screenshot os - independent) has been done somehow for
sdl / python.
Bye,
Daniel