#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/icon.h"
+ #include "wx/image.h"
#endif
-#include "wx/image.h"
#include "wx/xpmdecod.h"
#include "wx/rawbmp.h"
return false;
}
-bool wxBitmap::Ok() const
+bool wxBitmap::IsOk() const
{
return (M_BITMAPDATA && M_BITMAPDATA->m_ok);
}
void wxBitmap::SetWidth(int w)
{
- if (!M_BITMAPDATA)
- m_refData = new wxBitmapRefData;
-
+ AllocExclusive();
M_BITMAPDATA->m_width = w;
}
void wxBitmap::SetHeight(int h)
{
- if (!M_BITMAPDATA)
- m_refData = new wxBitmapRefData;
-
+ AllocExclusive();
M_BITMAPDATA->m_height = h;
}
void wxBitmap::SetDepth(int d)
{
- if (!M_BITMAPDATA)
- m_refData = new wxBitmapRefData;
-
+ AllocExclusive();
M_BITMAPDATA->m_depth = d;
}