MCPcopy Create free account
hub / github.com/audacity/audacity / RegisterImage

Method RegisterImage

libraries/lib-theme/Theme.cpp:338–352  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

336// Note that XPMs don't offer translucency, so unsuitable for a round shape overlay,
337// for example.
338void 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
354void ThemeBase::RegisterImage( NameSet &allNames,
355 int &flags, int &iIndex, const wxImage &Image, const wxString & Name )

Callers

nothing calls this directly

Calls 4

wxBitmapClass · 0.70
push_backMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected