From 54b6225c6c3722ec5bc8186a674fe9eb290d27ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 17 Feb 2020 19:23:36 +0100 Subject: [PATCH] Fixed "rect inversion" problems --- src/map/imgmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/imgmap.cpp b/src/map/imgmap.cpp index c1e8acba..9293f714 100644 --- a/src/map/imgmap.cpp +++ b/src/map/imgmap.cpp @@ -593,7 +593,7 @@ void IMGMap::draw(QPainter *painter, const QRectF &rect, Flags flags) QRectF polyRect(ttl, QPointF(ttl.x() + TILE_SIZE, ttl.y() + TILE_SIZE)); - polyRect &= bounds(); + polyRect &= bounds().adjusted(0.5, 0.5, -0.5, -0.5); RectD polyRectD(_transform.img2proj(polyRect.topLeft()), _transform.img2proj(polyRect.bottomRight())); _data->polys(polyRectD.toRectC(_projection, 4), _zoom, @@ -602,7 +602,7 @@ void IMGMap::draw(QPainter *painter, const QRectF &rect, Flags flags) QRectF pointRect(QPointF(ttl.x() - TEXT_EXTENT, ttl.y() - TEXT_EXTENT), QPointF(ttl.x() + TILE_SIZE + TEXT_EXTENT, ttl.y() + TILE_SIZE + TEXT_EXTENT)); - pointRect &= bounds(); + pointRect &= bounds().adjusted(0.5, 0.5, -0.5, -0.5); RectD pointRectD(_transform.img2proj(pointRect.topLeft()), _transform.img2proj(pointRect.bottomRight())); _data->points(pointRectD.toRectC(_projection, 4), _zoom,