[wxPython-users] Reducing the size of a BufferedDC
Alexander 'boesi' Bösecke
boesi.josi at gmx.net
Sat Dec 16 12:33:35 PST 2006
Hi
Am 14.12.2006 20:29:41 schrieb Christopher Barker:
> I see the same problem with 2.8 on OS-X, but not with 2.6. However,
> there is a bit of odd code. I've re-written it a bit, and it seems to
> work now.
So GetSize returns now the correct size (of the target DC)?
> You don't need to explicitly call destroy on the dc. In
> general, you don't call Destroy() in wxPython -- python's garbage
> collection handles that for you.
Yes I know, but obviously the buffered DC doesn't get destroyed - so it
was a try to destroy it manually.
> However, the other option is to create the off-screen bitmap yourself,
> then pass it in the constructor. See the commented code in the example.
>
> In real use, it's likely you want to keep that bitmap around anyway, so
> that your OnPaint handler can just blit it to the screen. See the
> DoubleBuffer demo in the Wiki.
Hmm but with BufferedDC this isn't needed, is it? I'm not really interested
in the size of the DC - but for drawing I need the correct size. Of
course I can save the size of the DC before doubble buffering, but this
confuses me somewhat.
cu boesi
--
<seasons82> was ist rl?
<seasons82> und muss man das wissen?
...der moment wo einem klar wird,
dass man zuviel chattet...
More information about the wxpython-users
mailing list