g.drawLine (Line<int> (x + r.getX(), r.getY(), x + r.getX(), r.getBottom()).toFloat());?
Or presuming “r” is a Rectangle create a float version of that first (Rectangle::toFloat()) and use it directly?
I tend to do most of drawing operations these days using Rectangles so the above code would look something like: