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

Function GetBrush

src/effects/DynamicRangeProcessorTransferFunctionPanel.cpp:56–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56auto GetBrush(
57 double kneeX, double kneeY, const wxColor& colorAtKnee, const wxSize& size,
58 const wxGraphicsContext& gc)
59{
60 using namespace DynamicRangeProcessorPanel;
61 constexpr auto w = .75;
62 const wxColor edgeColor = GetColorMix(backgroundColor, colorAtKnee, w);
63
64 const auto xf = size.GetWidth() / 2.; // "f" for "focus"
65 const auto yf = size.GetHeight() / 2.;
66 const auto radius = size.GetWidth();
67 return gc.CreateRadialGradientBrush(
68 kneeX, kneeY, xf, yf, radius, colorAtKnee, edgeColor);
69}
70
71void DrawTransferFunction(
72 wxPaintDC& dc, const wxRect& rect, const CompressorSettings& settings)

Callers 1

DrawTransferFunctionFunction · 0.85

Calls 3

GetColorMixFunction · 0.85
GetHeightMethod · 0.80
GetWidthMethod · 0.45

Tested by

no test coverage detected