I’m attempting to accomplish rounded corners on the main window of a plugin using a paint method like this:
paint (juce::Graphics& g)
{
juce::Colour bg(120,27,38);
juce::Colour transp(120.0f, 0, 0, 50.0f);
g.fillAll(transp);
g.setColour(bg);
juce::Rectangle mainRect(0, 0, getWidth(), getHeight());
g.drawRoundedRectangle(mainRect, 15, 2);
}
Now, the Graphics tutorial suggests I figure out how to make a filled rounded rectangle on my own as an exercise, but doesn’t offer any hint as to how. So I don’t know how I’ll manage to fill it; but what I’m encountering before I get to that is that my transparent red color here is completely ignored. It’s not there at all. It’s a normal rectangular window filled with dark gray or black. I don’t see any other fill commands or colors anywhere in my code. If this black is simply the default, is it possible somehow to make the sharp corners of the main window transparent some other way?
Thank you.