FR: fillRoundedRectangle( Rectangle<int> )


#1

Why is there no g.fillRoundedRectangle(Rectangle<int> rectangle, float cornerSize)

We’d be able to g.fillRoundedRectangle( getLocalBounds(), 5 ); if there were…

@jules @ed95 @fabian


#2
g.fillRoundedRectangle (getLocalBounds().toFloat(), 5.0f);

#3

ah ha!!! brilliant! :thumbsup:

can we get this added to the API?

void Graphics::fillRoundedRectangle (Rectangle<int> r, const float cornerSize) const
{
    fillRoundedRectangle( r.toFloat(), cornerSize );
}

#4

Don’t think it justifies bloating the class for that. Eventually most graphics and positioning code will change to use floats, so we generally avoid adding anything that encourages use of ints.