I know that wx supports the alpha layer in certain bitmap formats, but is it possible to paint semi-transparently to a dc using pens and brushes?
In the unlikely event someone else who knows better doesn't
actually respond, I was just researching this a bit and
found that functionality in the very early (rough) code
that is to be found on http://humane.sourceforge.net/the/.
Specifically, it uses a dc.Blit call with a particular
logical operation specified, apparently using wx.AND
for the translucent stuff. The code involved is
in the run_on_win.py file, though the whole thing is
pretty obscure and uses global variables and is next
to impossible to follow, at least with the half hour
I spent on it...
I'd give more info, but I don't know any...
-Peter
···
-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Chris Spencer
Sent: Friday, September 24, 2004 19:40
To: wxpython-users@lists.wxwindows.org
Subject: [wxPython-users] Alpha Painting?I know that wx supports the alpha layer in certain bitmap
formats, but is it possible to paint semi-transparently to a
dc using pens and brushes?
Chris Spencer wrote:
I know that wx supports the alpha layer in certain bitmap formats, but is it possible to paint semi-transparently to a dc using pens and brushes?
Not yet, but some approaches have been discussed. There are also some 3rd-party libs with Python wrappers that you can do Alpha rendering to an image and then display the image.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
That is the approach I've used in the past. I used PIL to generate
images with transparency then wx to get them on the screen. It sounds
like it would be expensive but it isn't.
···
On Sat, 2004-09-25 at 14:32 -0700, Robin Dunn wrote:
Chris Spencer wrote:
> I know that wx supports the alpha layer in certain bitmap formats, but
> is it possible to paint semi-transparently to a dc using pens and brushes?Not yet, but some approaches have been discussed. There are also some
3rd-party libs with Python wrappers that you can do Alpha rendering to
an image and then display the image.
--
Cliff Wells <clifford.wells@comcast.net>
Robin Dunn wrote:
Chris Spencer wrote:
I know that wx supports the alpha layer in certain bitmap formats, but is it possible to paint semi-transparently to a dc using pens and brushes?
Not yet, but some approaches have been discussed. There are also some 3rd-party libs with Python wrappers that you can do Alpha rendering to an image and then display the image.
Would it be possible to simply direct the painting into a bitmapbuffer and then average that bitmap with the current dc?