double buffer changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-10-09 18:56:41 +00:00
parent f541d8293a
commit 9a3dccf6d6
2 changed files with 33 additions and 6 deletions

View File

@@ -1338,6 +1338,11 @@ public:
wxBufferedDC( wxDC* dc,
const wxSize& area,
int style = wxBUFFER_CLIENT_AREA );
wxBufferedDC(wxWindow* win,
wxDC *dc,
const wxSize &area,
int style = wxBUFFER_CLIENT_AREA);
DocCtorStr(
~wxBufferedDC(),
@@ -1376,8 +1381,6 @@ automatically when it is destroyed. For example::
dc = wx.BufferedPaintDC(self, self.buffer)
", "");
class wxBufferedPaintDC : public wxBufferedDC
@@ -1391,13 +1394,10 @@ public:
"Create a buffered paint DC. As with `wx.BufferedDC`, you may either
provide the bitmap to be used for buffering or let this object create
one internally (in the latter case, the size of the client part of the
window is automatically used).
", "");
window is automatically used).", "");
};
//---------------------------------------------------------------------------
%newgroup
@@ -1514,6 +1514,26 @@ public:
"Constructor. Pass the window on which you wish to paint.", "");
};
//---------------------------------------------------------------------------
%newgroup
%pythoncode {
if 'wxMac' in wx.PlatformInfo or 'gtk2' in wx.PlatformInfo:
_AutoBufferedPaintDCBase = PaintDC
else:
_AutoBufferedPaintDCBase = BufferedPaintDC
class AutoBufferedPaintDC(_AutoBufferedPaintDCBase):
"""
If the current platform double buffers by default then this DC is the
same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
"""
def __init__(self, window):
_AutoBufferedPaintDCBase.__init__(self, window)
}
//---------------------------------------------------------------------------
%newgroup