From 0a012f770ef1eb5212661c9b6fcb7d8f7242f73f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 26 Oct 2006 03:28:14 +0000 Subject: [PATCH] docstring update git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_dc.i | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index 7c24e09d2a..7d1f08cf86 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -1425,16 +1425,26 @@ DocStr(wxBufferedDC, "This simple class provides a simple way to avoid flicker: when drawing on it, everything is in fact first drawn on an in-memory buffer (a `wx.Bitmap`) and then copied to the screen only once, when this object -is destroyed. +is destroyed. You can either provide a buffer bitmap yourself, and +reuse it the next time something needs painted, or you can let the +buffered DC create and provide a buffer bitmap itself. -It can be used in the same way as any other device context. +Buffered DCs can be used in the same way as any other device context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to use it in your EVT_PAINT handler, you should look at -`wx.BufferedPaintDC`. +`wx.BufferedPaintDC`. You can also use a wx.BufferedDC without +providing a target DC. In this case the operations done on the dc +will only be written to the buffer bitmap and *not* to any window, so +you will want to have provided the buffer bitmap and then reuse it +when it needs painted to the window. Please note that GTK+ 2.0 and OS X provide double buffering themselves -natively. wxBufferedDC is aware of this however, and will bypass the buffering -unless an explicit buffer bitmap is given. +natively. You may want to use `wx.Window.IsDoubleBuffered` to +determine whether you need to use buffering or not, or use +`wx.AutoBufferedPaintDC` to avoid needless double buffering on systems +that already do it automatically. + + ", ""); class wxBufferedDC : public wxMemoryDC -- 2.47.2