[wxPython-users] Re: Trouble with drawing, I need some ideas :)

Christopher Barker Chris.Barker at noaa.gov
Mon Oct 22 09:27:19 PDT 2007


Peter Damoc wrote:
> I was thinking that almost all drawing is done off-screen and that the 
> library that does the background drawing is the main reason for certain 
> performances issues.
> I didn't imagine that the final blitting to the pdc could be that 
> costly. :)

Have you tried anything yet?

All I know is that with the old DC method, a masked bitmap was 
apparently a non-native concept, so wx had to loop through all the 
pixels, check the mask, then draw or not draw the given pixel. It was 
orders of magnitude slower than drawing a non-masked bitmap. As a 
result, I didn't put multiple transparent layers in FloatCanvas -- you 
could draw a LOT of vector objects faster than drawing a masked bitmap.

I'm really curious how the performance is with alpha bitmaps with 
Graphics Context, but I don't know when I'll be able to test.

-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

Chris.Barker at noaa.gov




More information about the wxpython-users mailing list