No real changes, just inline wxDIB::Create().

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
This commit is contained in:
Vadim Zeitlin
2010-10-24 22:40:34 +00:00
parent 20af6fd5d3
commit 69060f4f0c
2 changed files with 3 additions and 11 deletions

View File

@@ -53,7 +53,7 @@ public:
// 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);

View File

@@ -137,18 +137,10 @@ bool wxDIB::Create(int width, int height, int depth)
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;