X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55ccdb93e4ae4b606a4068cb37492c1ec3ed77a6..4e2a3778386d60356dab319afa2d3f987f86d6b2:/src/mgl/bitmap.cpp diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index d8396837c4..65294d62c6 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -60,6 +60,8 @@ public: wxBitmapRefData(); virtual ~wxBitmapRefData(); + virtual bool IsOk() const { return m_bitmap != NULL; } + int m_width; int m_height; int m_bpp; @@ -90,8 +92,6 @@ wxBitmapRefData::~wxBitmapRefData() #define M_BMPDATA ((wxBitmapRefData *)m_refData) - -IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxBitmapHandlerBase) IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxBitmapBase) wxBitmap::wxBitmap(int width, int height, int depth) @@ -267,11 +267,6 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) delete bdc; } -bool wxBitmap::IsOk() const -{ - return (m_refData != NULL && M_BMPDATA->m_bitmap != NULL); -} - int wxBitmap::GetHeight() const { wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") ); @@ -647,7 +642,7 @@ bool wxMGLBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, int w = bitmap->GetWidth(), h = bitmap->GetHeight(); - mem.SelectObject(*bitmap); + mem.SelectObjectAsSource(*bitmap); tdc = mem.GetMGLDC(); switch (type)