SUMMARY GeoPainter::regionFromRect() is advertised as parameter-compatible with GeoPainter::drawRect(). However, the resulting region is not centered around the centerPoint, but rather uses it as top-left corner for the resulting QRegion. STEPS TO REPRODUCE 1. Use drawRect to render a non-geoprojected rectangle 2. Use regionFromRect with the same parameters to create a QRegion 3. Draw the resulting region using drawRect in screen coordinates OBSERVED RESULT The rectangle rendered in step 3 is centered around the bottom-right corner of the rectangle rendered in step 1. EXPECTED RESULT Both rectangles should overlap around the same center. SOFTWARE/OS VERSIONS Operating System: Debian GNU/Linux KDE Plasma Version: 5.17.5 KDE Frameworks Version: 5.74.0 Qt Version: 5.14.2 ADDITIONAL INFORMATION
A possibly relevant merge request was started @ https://invent.kde.org/education/marble/-/merge_requests/38
Git commit a8b9ffe0e615d5429ff079df2e63d85e27db158e by Johannes Zarl-Zierl. Committed on 11/01/2021 at 22:26. Pushed by rahn into branch 'master'. Properly center GeoPainter::regionFromRect M +8 -7 src/lib/marble/GeoPainter.cpp https://invent.kde.org/education/marble/commit/a8b9ffe0e615d5429ff079df2e63d85e27db158e