X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87f83ac8676d83b1bc75cbb0a6b4cf612f86bc2b..6a305cfbc85bedfc59ccb1b6b9619f4aeb790b31:/src/mgl/bitmap.cpp diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index 2d7e61108f..a1a9c5695f 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -91,7 +91,7 @@ wxBitmapRefData::~wxBitmapRefData() #define M_BMPDATA ((wxBitmapRefData *)m_refData) -IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler,wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxBitmapHandlerBase) IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxBitmapBase) wxBitmap::wxBitmap(int width, int height, int depth) @@ -171,19 +171,6 @@ bool wxBitmap::Create(int width, int height, int depth) return Ok(); } -bool wxBitmap::CreateFromXpm(const char **bits) -{ - wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") ); - - wxXPMDecoder decoder; - wxImage img = decoder.ReadData(bits); - wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") ); - - *this = wxBitmap(img); - - return true; -} - wxBitmap::wxBitmap(const wxImage& image, int depth) { long width, height; @@ -290,7 +277,7 @@ bool wxBitmap::operator != (const wxBitmap& bmp) const return (m_refData != bmp.m_refData); } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (m_refData != NULL && M_BMPDATA->m_bitmap != NULL); } @@ -535,7 +522,7 @@ bitmap_t *wxBitmap::GetMGLbitmap_t() const // Convert wxColour into it's quantized value in lower-precision // pixel format (needed for masking by colour). -wxColour wxBitmap::QuantizeColour(const wxColour& clr) +wxColour wxBitmap::QuantizeColour(const wxColour& clr) const { pixel_format_t *pf = GetMGLbitmap_t()->pf; @@ -559,7 +546,7 @@ public: const wxString& extension, const wxString& name); virtual bool Create(wxBitmap *WXUNUSED(bitmap), - void *WXUNUSED(data), + const void* WXUNUSED(data), long WXUNUSED(flags), int WXUNUSED(width), int WXUNUSED(height), @@ -777,7 +764,7 @@ class wxICOBitmapHandler: public wxBitmapHandler const wxString& extension, const wxString& name); virtual bool Create(wxBitmap *WXUNUSED(bitmap), - void *WXUNUSED(data), + const void* WXUNUSED(data), long WXUNUSED(flags), int WXUNUSED(width), int WXUNUSED(height),