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

Method CreateBitmap

src/effects/EffectUI.cpp:978–1009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976}
977
978wxBitmap EffectUIHost::CreateBitmap(const char * const xpm[], bool up, bool pusher)
979{
980 wxMemoryDC dc;
981 wxBitmap pic(xpm);
982
983 wxBitmap mod(pic.GetWidth() + 6, pic.GetHeight() + 6, 24);
984 dc.SelectObject(mod);
985
986#if defined(__WXGTK__)
987 wxColour newColour = wxSystemSettings::GetColour(wxSYS_COLOUR_BACKGROUND);
988#else
989 wxColour newColour = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
990#endif
991
992 dc.SetBackground(wxBrush(newColour));
993 dc.Clear();
994
995 int offset = 3;
996 if (pusher)
997 {
998 if (!up)
999 {
1000 offset += 1;
1001 }
1002 }
1003
1004 dc.DrawBitmap(pic, offset, offset, true);
1005
1006 dc.SelectObject(wxNullBitmap);
1007
1008 return mod;
1009}
1010
1011void EffectUIHost::UpdateControls()
1012{

Callers

nothing calls this directly

Calls 5

wxBrushClass · 0.85
GetHeightMethod · 0.80
DrawBitmapMethod · 0.80
GetWidthMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected