GeoPainter: consistent qreal-based API, separate regionFromPixmapRect()
ClosedPublic

Authored by kossebau on Jul 24 2016, 10:19 PM.

Details

Summary

GeoPainter API had a mixture of int and qreal-based methods, and internally
was inconsistently relaying to int or qreal-based QPainter methods.

Regions used for painting rects and ellipses depend on whether anti-aliasing
is enabled or not, and can result in offsets of at least 1 pixel.
So calculations now tries to respect that.

GeoPainter::regionFromRect() was used for getting the region of pixmaps
being rendered. Especially in non-anti-aliased mode though this does not
match, also is there no stroke-width on painting pixmaps.
A special GeoPainter::regionFromPixmapRect() should serve that purpose now.

Diff Detail

Repository
R34 Marble
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau updated this revision to Diff 5482.Jul 24 2016, 10:19 PM
kossebau retitled this revision from to GeoPainter: consistent qreal-based API, separate regionFromPixmapRect().
kossebau updated this object.
kossebau edited the test plan for this revision. (Show Details)
kossebau added reviewers: Marble, nienhueser, rahn, shentey.
rahn accepted this revision.Jul 25 2016, 8:10 AM
rahn edited edge metadata.

Looks good!

This revision is now accepted and ready to land.Jul 25 2016, 8:10 AM
This revision was automatically updated to reflect the committed changes.