save a reference to the bitmap so it doesn't get destroyed before the
buffered DC does git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1521,10 +1521,6 @@ that already do it automatically.
|
|||||||
class wxBufferedDC : public wxMemoryDC
|
class wxBufferedDC : public wxMemoryDC
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
%pythonAppend wxBufferedDC
|
|
||||||
"self.__dc = args[0] # save a ref so the other dc will not be deleted before self";
|
|
||||||
|
|
||||||
%nokwargs wxBufferedDC;
|
|
||||||
|
|
||||||
DocStr(
|
DocStr(
|
||||||
wxBufferedDC,
|
wxBufferedDC,
|
||||||
@@ -1550,8 +1546,16 @@ public:
|
|||||||
intended to cover the entire virtual size of a `wx.ScrolledWindow` or
|
intended to cover the entire virtual size of a `wx.ScrolledWindow` or
|
||||||
if it only covers the client area. Acceptable values are
|
if it only covers the client area. Acceptable values are
|
||||||
``wx.BUFFER_VIRTUAL_AREA`` and ``wx.BUFFER_CLIENT_AREA``.
|
``wx.BUFFER_VIRTUAL_AREA`` and ``wx.BUFFER_CLIENT_AREA``.
|
||||||
|
|
||||||
");
|
");
|
||||||
|
|
||||||
|
%nokwargs wxBufferedDC;
|
||||||
|
%pythonAppend wxBufferedDC
|
||||||
|
"# save a ref so the other dc will not be deleted before self
|
||||||
|
self.__dc = args[0]
|
||||||
|
# also save a ref to the bitmap
|
||||||
|
if len(args) > 1: self.__bmp = args[1]
|
||||||
|
";
|
||||||
|
|
||||||
wxBufferedDC( wxDC* dc,
|
wxBufferedDC( wxDC* dc,
|
||||||
wxBitmap& buffer=wxNullBitmap,
|
wxBitmap& buffer=wxNullBitmap,
|
||||||
int style = wxBUFFER_CLIENT_AREA );
|
int style = wxBUFFER_CLIENT_AREA );
|
||||||
@@ -1610,6 +1614,8 @@ class wxBufferedPaintDC : public wxBufferedDC
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
%pythonAppend wxBufferedPaintDC "if len(args) > 1: self.__bmp = args[1]";
|
||||||
|
|
||||||
DocCtorStr(
|
DocCtorStr(
|
||||||
wxBufferedPaintDC( wxWindow *window,
|
wxBufferedPaintDC( wxWindow *window,
|
||||||
wxBitmap &buffer = wxNullBitmap,
|
wxBitmap &buffer = wxNullBitmap,
|
||||||
|
Reference in New Issue
Block a user