When to use Graphics::resetToDefaultState()?


#1

Should I get into the habit of always calling Graphics::resetToDefaultState() at the top of each of my paint() functions? Or can I assume the Graphics context is always set to a predictable “default” state by JUCE prior to calling our code?


#2

I don’t think you should ever need to call it yourself - when your paint() method is called, the Graphics will already be in a sensible state in terms of selected colour, font, clip region etc.