#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)
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;
return (m_refData != bmp.m_refData);
}
-bool wxBitmap::Ok() const
+bool wxBitmap::IsOk() const
{
return (m_refData != NULL && M_BMPDATA->m_bitmap != NULL);
}
// 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;
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),
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),