MCPcopy Create free account
hub / github.com/StrangeLoopsAudio/gRainbow / paint

Method paint

Source/Components/FilterControl.cpp:90–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void FilterControl::paint(juce::Graphics& g) {
91 juce::Colour colour = Utils::Colour::GLOBAL;
92
93 g.setColour(Utils::Colour::PANEL);
94 g.fillRoundedRectangle(getLocalBounds().expanded(0, 20).translated(0, -20).toFloat(), 10);
95
96 g.setColour(Utils::Colour::BACKGROUND);
97 g.fillRect(mVizRect);
98
99 // Set gradient
100 g.setFillType(juce::ColourGradient(colour.withAlpha(0.35f), mVizRect.getTopLeft(), colour.withAlpha(0.05f), mVizRect.getBottomLeft(), false));
101 g.fillPath(mFilterPath);
102
103 // Stroke highlight on path
104 g.setColour(colour);
105 g.strokePath(mFilterPath, mPathStroke);
106
107}
108
109void FilterControl::resized() {
110 auto r = getLocalBounds().reduced(Utils::PADDING);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected