By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,508 Members | 1,856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,508 IT Pros & Developers. It's quick & easy.

Have you any idea how to make window transparent using pygame?

P: n/a
Hello everybody!

I just want to make window transparent. ;) At this moment I've found
only ideas of taking screenshots to make background... Anything else?

Thanks for help!

Jan 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 30 Jan 2006 08:52:04 -0800
"kishkin" <ki*****@gmail.com> wrote:
I just want to make window transparent. ;) At this moment
I've found only ideas of taking screenshots to make
background... Anything else?


You are looking for "alpha" surfaces. In a full RGBA
surface, the "A" or "alpha" represents the degree of
transparency of the surface for each pixel. There is also
such a thing as a per-surface alpha, etc.

The documentation can be had from the PyGame website at
http://www.pygame.org. You will also find a link to a
PyGame-specific mailing list, which is really the best place
to ask about this sort of thing.

--
Terry Hancock (ha*****@AnansiSpaceworks.com)
Anansi Spaceworks http://www.AnansiSpaceworks.com

Jan 30 '06 #2

P: n/a
Terry Hancock schrieb:
On 30 Jan 2006 08:52:04 -0800
"kishkin" <ki*****@gmail.com> wrote:
I just want to make window transparent. ;) At this moment
I've found only ideas of taking screenshots to make
background... Anything else?


You are looking for "alpha" surfaces. In a full RGBA
surface, the "A" or "alpha" represents the degree of
transparency of the surface for each pixel. There is also
such a thing as a per-surface alpha, etc.

The documentation can be had from the PyGame website at
http://www.pygame.org. You will also find a link to a
PyGame-specific mailing list, which is really the best place
to ask about this sort of thing.


That alone won't help. First of all, the alpha only is applied to the
contents of the pygame window - so you need to capture the background
behind that first and put it in the window as background. But if that
background changes, you won't be notified.

But that still won't rid you of the window decorations...
I guess one could do that with OS-specific calls to window-handles or
the like (and in PyObjc its a no-brainer, as the Mac windowing-system
supports that natively)

But in pygame, there is no API for that.

Regards,

Diez
Jan 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.