I’m building a zoom feature for my GUI, but I get some aliasing when I zoom out too far.
I understand more or less what’s happening here: the zoom function calculates the gap between cells as less than 1, which can’t be represented by an int. But I’m not sure how to fix it, as
setBounds() can only take a
Rectangle<int> as argument (ie. there is no
setBounds(Rectangle<float>)). Right now, I’m doing all the zoom calculations with floats and then converting them to ints at the end using
toNearestIntEdges(), with the result pictured above.
I know that JUCE has anti-aliasing built into the graphical rendering on a low level; how can I exploit this from the Component class, so that my Components don’t alias?