13#include <wx/dcclient.h>
20 auto gc = wxGraphicsContext::Create(dc);
21 gc->SetAntialiasMode(wxANTIALIAS_DEFAULT);
22 gc->SetInterpolationQuality(wxINTERPOLATION_BEST);
23 return std::unique_ptr<wxGraphicsContext>(gc);
26wxColor
GetColorMix(
const wxColor& a,
const wxColor& b,
double aWeight)
29 a.Red() * aWeight + b.Red() * (1 - aWeight),
30 a.Green() * aWeight + b.Green() * (1 - aWeight),
31 a.Blue() * aWeight + b.Blue() * (1 - aWeight),
32 a.Alpha() * aWeight + b.Alpha() * (1 - aWeight));
47 constexpr auto useGradient =
false;
48 return useGradient ? gc.CreateLinearGradientBrush(
57 return panel.GetClientRect();
59 auto rect = panel.GetClientRect();
60 rect.SetX(rect.GetX() + 1);
61 rect.SetY(rect.GetY() + 1);
62 rect.SetWidth(rect.GetWidth() - 1);
63 rect.SetHeight(rect.GetHeight() - 1);
wxColor GetColorMix(const wxColor &a, const wxColor &b, double aWeight)
float GetGraphDbRange(int height)
std::unique_ptr< wxGraphicsContext > MakeGraphicsContext(const wxPaintDC &dc)
static constexpr auto graphMinHeight
static const wxColour backgroundColor
wxRect GetPanelRect(const wxPanelWrapper &panel)
static constexpr auto graphMinRangeDb
wxGraphicsBrush GetGraphBackgroundBrush(wxGraphicsContext &gc, int height)