Audacity 3.2.0
DynamicRangeProcessorPanelCommon.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 DynamicRangeProcessorPanelCommon.h
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#pragma once
12
13#include <memory>
14#include <wx/colour.h>
15#include <wx/graphics.h>
16
17class wxGraphicsContext;
18class wxPaintDC;
19class wxPanelWrapper;
20
22{
23static const wxColour backgroundColor { 43, 43, 75 };
24static const wxColour attackColor { 255, 0, 0, 100 };
25static const wxColour releaseColor { 190, 120, 255, 100 };
26static const wxColour lineColor { 72, 72, 72 };
27static const wxColour targetCompressionColor { 255, 255, 255 };
28static const wxColour inputColor { 86, 86, 149 };
29static const wxColour outputColor { 182, 182, 244, 70 };
30static const wxColour actualCompressionColor { 252, 220, 151 };
31
32static constexpr auto targetCompressionLineWidth = 2;
33static constexpr auto outputLineWidth = 2;
34static constexpr auto graphMinHeight = 270;
35static constexpr auto graphMinRangeDb = 20.f;
36
37std::unique_ptr<wxGraphicsContext> MakeGraphicsContext(const wxPaintDC& dc);
38
39wxColor GetColorMix(const wxColor& a, const wxColor& b, double aWeight);
40
41float GetGraphDbRange(int height);
42
43wxGraphicsBrush GetGraphBackgroundBrush(wxGraphicsContext& gc, int height);
44
45wxRect GetPanelRect(const wxPanelWrapper& panel);
46} // namespace DynamicRangeProcessorPanel
wxColor GetColorMix(const wxColor &a, const wxColor &b, double aWeight)
std::unique_ptr< wxGraphicsContext > MakeGraphicsContext(const wxPaintDC &dc)
wxRect GetPanelRect(const wxPanelWrapper &panel)
wxGraphicsBrush GetGraphBackgroundBrush(wxGraphicsContext &gc, int height)