Fix off-by-one/one positioning by GeoPainter::drawEllipse/Rectangle
Summary:
GeoPainter::drawEllipse() & GeoPainter::drawRect() both take the
parameters width & height as qreal type, but if !isGeoProjected they do the
actual rendering calls using int based coordinates & sizes.
The old calculation would not compensate qreal->int rounding changes and often result
in a wrong 1 pixel offset in direction of topleft corner.
The respective GeoPainter::regionFromEllipse() and GeoPainter::regionFromRect()
also are adapted, with the first also being fixed to take also strokeWidth
into account for the topleft corner calculation, like done with the rect.
Test Plan: Extended geopainter example app renders rectangles and ellipses as expected.
Reviewers: nienhueser, rahn, Marble
Reviewed By: rahn, Marble
Differential Revision: https://phabricator.kde.org/D2141