void ReactiveWaveformElement::paint(juce::Graphics &g) { g.saveState(); g.setColour(colour()); g.strokePath(path, PathStrokeType(lineThickness())); if (fill) { g.setColour(fillColour()); g.fillPath(path); } if (clip) { g.reduceClipRegion(path); } GraphicsElement::paint(g); g.restoreState(); }
void ReactiveRectangleElement::paint(juce::Graphics &g) { g.saveState(); if (clip) { g.reduceClipRegion(clipPath); } if(width() > 0 && height() > 0) { if (fill) { g.setColour(fillColour()); g.fillRoundedRectangle(fx, fy, fw, fh, radius()); } g.setColour(borderColour()); g.drawRoundedRectangle(fx, fy, fw, fh, radius(), borderWidth()); } GraphicsElement::paint(g); g.restoreState(); }