After removing wxDIB::m_hasAlpha in the previous commit, this method became
completely trivial so put it inline in the header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65900
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// same as the corresponding ctors but with return value
bool Create(int width, int height, int depth);
- bool Create(const wxBitmap& bmp);
+ bool Create(const wxBitmap& bmp) { return Create(GetHbitmapOf(bmp)); }
bool Create(HBITMAP hbmp);
bool Load(const wxString& filename);
return true;
}
-bool wxDIB::Create(const wxBitmap& bmp)
-{
- wxCHECK_MSG( bmp.Ok(), false, wxT("wxDIB::Create(): invalid bitmap") );
-
- if ( !Create(GetHbitmapOf(bmp)) )
- return false;
-
- return true;
-}
-
bool wxDIB::Create(HBITMAP hbmp)
{
+ wxCHECK_MSG( hbmp, false, wxT("wxDIB::Create(): invalid bitmap") );
+
// this bitmap could already be a DIB section in which case we don't need
// to convert it to DIB
DIBSECTION ds;