Fix return type of wxBitmap::UseAlpha() under wxMSW
The method should return bool but was returning void. This commit is best viewed ignoring whitespace-only changes. Closes #23903, #23919.
This commit is contained in:
parent
3c6869605e
commit
5ca3157467
2 changed files with 8 additions and 9 deletions
|
|
@ -177,7 +177,7 @@ public:
|
|||
void SetMask(wxMask *mask);
|
||||
|
||||
bool HasAlpha() const;
|
||||
void UseAlpha(bool use = true);
|
||||
bool UseAlpha(bool use = true);
|
||||
void ResetAlpha() { UseAlpha(false); }
|
||||
|
||||
// old synonyms for CreateWithDIPSize() and GetLogicalXXX() functions
|
||||
|
|
|
|||
|
|
@ -1222,16 +1222,15 @@ wxDC *wxBitmap::GetSelectedInto() const
|
|||
#endif
|
||||
}
|
||||
|
||||
void wxBitmap::UseAlpha(bool use)
|
||||
bool wxBitmap::UseAlpha(bool use)
|
||||
{
|
||||
if ( GetBitmapData() )
|
||||
{
|
||||
// Only 32bpp bitmaps can contain alpha channel.
|
||||
if ( use && GetBitmapData()->m_depth < 32 )
|
||||
use = false;
|
||||
// Only 32bpp bitmaps can contain alpha channel.
|
||||
if ( !GetBitmapData() || (use && GetBitmapData()->m_depth < 32) )
|
||||
return false;
|
||||
|
||||
GetBitmapData()->m_hasAlpha = use;
|
||||
}
|
||||
GetBitmapData()->m_hasAlpha = use;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxBitmap::HasAlpha() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue