1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Fixed "rect inversion" problems

This commit is contained in:
Martin Tůma 2020-02-17 19:23:36 +01:00
parent 48c7299ba6
commit 54b6225c6c

View File

@ -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,