Drop and Inner shadows need to account for desktop/context scale
sudara opened this issue · 1 comments
In short: The radii are specified as logical pixels, but are being passed straight to the underlying image blur at 1.0 scaling without accounting for the scale of the graphics context.
This means that the blurs currently aren't retina friendly and probably have banding.
There's the OS scaling:
g.getInternalContext().getPhysicalPixelScaleFactor();
The question here is if the main juce::Graphics's context is set to 2.0 and we're writing to blur images at 1.0, are we making worse blurs and then scaling them up?
Rephrased: is it worth matching the main context.getPhysicalPixelScaleFactor() at the expense of larger blur times? Or are things "close enough". Do we need an "HD" option?
But there is one more concern: application scaling, which as of 2020 is recommend to get/set via:
juce::Desktop::getInstance().getGlobalScaleFactor()
juce::Desktop::getInstance().setGlobalScaleFactor()
See: https://forum.juce.com/t/issue-with-audioprocessoreditor-setscalefactor/38602/6