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

Method OnPaint

src/effects/ClipIndicatorPanel.cpp:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void ClipIndicatorPanel::OnPaint(wxPaintEvent& evt)
43{
44 using namespace DynamicRangeProcessorPanel;
45
46 wxPaintDC dc { this };
47 const auto color = mClipping ? *wxRED : *wxLIGHT_GREY;
48 dc.SetBrush(color);
49 dc.SetPen(lineColor);
50 auto rect = GetPanelRect(*this);
51 dc.DrawRoundedRectangle(rect, 2);
52
53 // This is supposed to be a LED. Add a little shine.
54 dc.SetBrush(GetColorMix(*wxWHITE, color, 0.5));
55 dc.SetPen(*wxTRANSPARENT_PEN);
56 dc.DrawRoundedRectangle(rect.Deflate(2), 2);
57}

Callers

nothing calls this directly

Calls 2

GetPanelRectFunction · 0.85
GetColorMixFunction · 0.85

Tested by

no test coverage detected