If I set a colour gradient and paint an empty rectangleList, I have a beautiful gradient background.
Shouldn’t it just paint nothing?
To reproduce just create the default ui app with projucer on mac and use that paint code:
(tested on mac only)
void MainComponent::paint (juce::Graphics& g)
{
g.fillAll (juce::Colours::whitesmoke);
auto colourGradient = juce::ColourGradient::horizontal (juce::Colours::yellow,
juce::Colours::red, getLocalBounds());
g.setGradientFill (colourGradient);
juce::RectangleList<float> rectangleList;
g.fillRectList (rectangleList);
}