| 101 | } |
| 102 | |
| 103 | void CompressionMeterPanel::OnPaint(wxPaintEvent& evt) |
| 104 | { |
| 105 | using namespace DynamicRangeProcessorPanel; |
| 106 | |
| 107 | wxPaintDC dc(this); |
| 108 | |
| 109 | const auto rect = DynamicRangeProcessorPanel::GetPanelRect(*this); |
| 110 | const auto gc = MakeGraphicsContext(dc); |
| 111 | const auto left = rect.GetLeft(); |
| 112 | const auto top = rect.GetTop(); |
| 113 | const auto width = rect.GetWidth(); |
| 114 | const auto height = rect.GetHeight(); |
| 115 | |
| 116 | gc->SetPen(*wxTRANSPARENT_PEN); |
| 117 | gc->SetBrush(GetGraphBackgroundBrush(*gc, height)); |
| 118 | gc->DrawRectangle(left, top, width, height); |
| 119 | |
| 120 | auto leftRect = rect; |
| 121 | leftRect.SetWidth(rect.GetWidth() / 2 - 2); |
| 122 | leftRect.Offset(1, 0); |
| 123 | PaintMeter(dc, actualCompressionColor, leftRect, *mCompressionMeter); |
| 124 | |
| 125 | auto rightRect = leftRect; |
| 126 | rightRect.Offset(leftRect.GetWidth(), 0); |
| 127 | PaintMeter(dc, outputColor, rightRect, *mOutputMeter); |
| 128 | |
| 129 | gc->SetPen(lineColor); |
| 130 | gc->SetBrush(wxNullBrush); |
| 131 | gc->DrawRectangle(left, top, width, height); |
| 132 | } |
| 133 | |
| 134 | void CompressionMeterPanel::PaintMeter( |
| 135 | wxPaintDC& dc, const wxColor& color, const wxRect& rect, |
nothing calls this directly
no test coverage detected