Can wxMemoryDC derive from wxWindowDC on all platforms?

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2006-11-03 07:45:01 +00:00
parent 522f97d64e
commit e676f137e7

View File

@ -1299,65 +1299,6 @@ public:
//---------------------------------------------------------------------------
%newgroup
MustHaveApp(wxMemoryDC);
DocStr(wxMemoryDC,
"A memory device context provides a means to draw graphics onto a
bitmap. A bitmap must be selected into the new memory DC before it may
be used for anything. Typical usage is as follows::
dc = wx.MemoryDC()
dc.SelectObject(bitmap)
# draw on the dc using any of the Draw methods
dc.SelectObject(wx.NullBitmap)
# the bitmap now contains wahtever was drawn upon it
Note that the memory DC *must* be deleted (or the bitmap selected out
of it) before a bitmap can be reselected into another memory DC.
", "");
class wxMemoryDC : public wxDC {
public:
DocCtorStr(
wxMemoryDC(wxBitmap& bitmap = wxNullBitmap),
"Constructs a new memory device context.
Use the Ok member to test whether the constructor was successful in
creating a usable device context. If a bitmap is not given to this
constructor then don't forget to select a bitmap into the DC before
drawing on it.", "
:see: `MemoryDCFromDC`");
DocCtorStrName(
wxMemoryDC(wxDC* oldDC),
"Creates a DC that is compatible with the oldDC.", "",
MemoryDCFromDC);
DocDeclStr(
void , SelectObject(wxBitmap& bitmap),
"Selects the bitmap into the device context, to use as the memory
bitmap. Selecting the bitmap into a memory DC allows you to draw into
the DC, and therefore the bitmap, and also to use Blit to copy the
bitmap to a window.
If the argument is wx.NullBitmap (or some other uninitialised
`wx.Bitmap`) the current bitmap is selected out of the device context,
and the original bitmap restored, allowing the current bitmap to be
destroyed safely.", "");
DocDeclStr(
void , SelectObjectAsSource(const wxBitmap& bmp),
"", "");
};
//---------------------------------------------------------------------------
%newgroup
@ -1476,6 +1417,66 @@ public:
//---------------------------------------------------------------------------
%newgroup
MustHaveApp(wxMemoryDC);
DocStr(wxMemoryDC,
"A memory device context provides a means to draw graphics onto a
bitmap. A bitmap must be selected into the new memory DC before it may
be used for anything. Typical usage is as follows::
dc = wx.MemoryDC()
dc.SelectObject(bitmap)
# draw on the dc using any of the Draw methods
dc.SelectObject(wx.NullBitmap)
# the bitmap now contains wahtever was drawn upon it
Note that the memory DC *must* be deleted (or the bitmap selected out
of it) before a bitmap can be reselected into another memory DC.
", "");
class wxMemoryDC : public wxWindowDC {
public:
DocCtorStr(
wxMemoryDC(wxBitmap& bitmap = wxNullBitmap),
"Constructs a new memory device context.
Use the Ok member to test whether the constructor was successful in
creating a usable device context. If a bitmap is not given to this
constructor then don't forget to select a bitmap into the DC before
drawing on it.", "
:see: `MemoryDCFromDC`");
DocCtorStrName(
wxMemoryDC(wxDC* oldDC),
"Creates a DC that is compatible with the oldDC.", "",
MemoryDCFromDC);
DocDeclStr(
void , SelectObject(wxBitmap& bitmap),
"Selects the bitmap into the device context, to use as the memory
bitmap. Selecting the bitmap into a memory DC allows you to draw into
the DC, and therefore the bitmap, and also to use Blit to copy the
bitmap to a window.
If the argument is wx.NullBitmap (or some other uninitialised
`wx.Bitmap`) the current bitmap is selected out of the device context,
and the original bitmap restored, allowing the current bitmap to be
destroyed safely.", "");
DocDeclStr(
void , SelectObjectAsSource(const wxBitmap& bmp),
"", "");
};
//---------------------------------------------------------------------------
%newgroup