MCPcopy Create free account
hub / github.com/jerryuhoo/Fire / paint

Method paint

Source/Panels/ControlPanel/Graph Components/DistortionGraph.cpp:34–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void DistortionGraph::paint(juce::Graphics& g)
35{
36 // The paint function is now very lightweight. It only draws the pre-calculated path.
37 auto frameRight = getLocalBounds();
38
39 g.setColour(COLOUR6);
40 g.drawRect(getLocalBounds(), 1);
41
42 // Create the gradient and draw the stored path
43 juce::ColourGradient grad(SHAPE_COLOUR.withBrightness(0.9), frameRight.getX() + frameRight.getWidth() / 2, frameRight.getY() + frameRight.getHeight() / 2, juce::Colours::yellow.withBrightness(0.9).withAlpha(0.0f), frameRight.getX(), frameRight.getY() + frameRight.getHeight() / 2, true);
44 g.setGradientFill(grad);
45 g.strokePath(distortionCurve, juce::PathStrokeType(2.0f));
46}
47
48void DistortionGraph::setState(int mode, float rec, float mix, float bias, float drive, float rateDivide)
49{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected