| 32 | } |
| 33 | |
| 34 | void 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 | |
| 48 | void DistortionGraph::setState(int mode, float rec, float mix, float bias, float drive, float rateDivide) |
| 49 | { |
nothing calls this directly
no outgoing calls
no test coverage detected