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:
@@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
// same as the corresponding ctors but with return value
|
// same as the corresponding ctors but with return value
|
||||||
bool Create(int width, int height, int depth);
|
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 Create(HBITMAP hbmp);
|
||||||
bool Load(const wxString& filename);
|
bool Load(const wxString& filename);
|
||||||
|
|
||||||
|
@@ -137,18 +137,10 @@ bool wxDIB::Create(int width, int height, int depth)
|
|||||||
return true;
|
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)
|
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
|
// this bitmap could already be a DIB section in which case we don't need
|
||||||
// to convert it to DIB
|
// to convert it to DIB
|
||||||
DIBSECTION ds;
|
DIBSECTION ds;
|
||||||
|
Reference in New Issue
Block a user