If you want to setAlpha,you should use SetAplphaData.
like this:
def setAlphaValue(self,bmp,alpha):
# bmp is wx.Image
if not bmp.HasAlpha():
bmp.InitAlpha()
bmp.SetAlphaData(chr(alpha)*bmp.GetWidth()*bmp.GetHeight())
···
2007-10-23
发件人: Christopher Barker
发送时间:
2007-10-18 01:16:33
收件人:
wxPython-users@lists.wxwidgets.org
抄送:
主题: Re: [wxPython-users] Re: Trouble with drawing, I need some ideas ![]()
Robin Dunn wrote:
By the way, what is the performance like drawing (blitting)
transparent bitmaps with DC (or GC)? It used to be very, very, slow to
Draw a masked Bitmap to a DC.
I’m not sure, but I expect that it varies widely by platform.
Probably so – I guess it’s time for some profiling!
-Chris
–
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org