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.
| 336 | // Note that XPMs don't offer translucency, so unsuitable for a round shape overlay, |
| 337 | // for example. |
| 338 | void ThemeBase::RegisterImage( NameSet &allNames, |
| 339 | int &flags, int &iIndex, char const ** pXpm, const wxString & Name ) |
| 340 | { |
| 341 | wxBitmap Bmp( pXpm ); |
| 342 | wxImage Img( Bmp.ConvertToImage() ); |
| 343 | // The next line recommended by http://forum.audacityteam.org/viewtopic.php?f=50&t=96765 |
| 344 | Img.SetMaskColour(0xDE, 0xDE, 0xDE); |
| 345 | Img.InitAlpha(); |
| 346 | |
| 347 | //dmazzoni: the top line does not work on wxGTK |
| 348 | //wxBitmap Bmp2( Img, 32 ); |
| 349 | //wxBitmap Bmp2( Img ); |
| 350 | |
| 351 | RegisterImage( allNames, flags, iIndex, Img, Name ); |
| 352 | } |
| 353 | |
| 354 | void ThemeBase::RegisterImage( NameSet &allNames, |
| 355 | int &flags, int &iIndex, const wxImage &Image, const wxString & Name ) |