mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-21 14:50:06 +02:00
Mask for XPM RegisterImage()
Per conversation on http://forum.audacityteam.org/viewtopic.php?f=50&t=96765 I'm not convinced, but the function is unused, so it is a net plus to add this code with a comment.
This commit is contained in:
parent
47372cfe7d
commit
dd02a02c25
@ -448,12 +448,17 @@ wxImage ThemeBase::MaskedImage( char const ** pXpm, char const ** pMask )
|
||||
return Img1;
|
||||
}
|
||||
|
||||
// Legacy function to allow use of an XPM where no theme image was defined.
|
||||
// Bit depth and mask needs review.
|
||||
// Note that XPMs don't offer translucency, so unsuitable for a round shape overlay,
|
||||
// for example.
|
||||
void ThemeBase::RegisterImage( int &iIndex, char const ** pXpm, const wxString & Name )
|
||||
{
|
||||
|
||||
wxASSERT( iIndex == -1 ); // Don't initialise same bitmap twice!
|
||||
wxBitmap Bmp( pXpm ); // a 24 bit bitmap.
|
||||
wxBitmap Bmp( pXpm );
|
||||
wxImage Img( Bmp.ConvertToImage() );
|
||||
// The next line recommended by http://forum.audacityteam.org/viewtopic.php?f=50&t=96765
|
||||
Img.SetMaskColour(0xDE, 0xDE, 0xDE);
|
||||
Img.InitAlpha();
|
||||
|
||||
//dmazzoni: the top line does not work on wxGTK
|
||||
|
Loading…
x
Reference in New Issue
Block a user