From 7163441cb56e965f6aa16a47686adae235782e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 4 Jun 2021 21:04:09 +0200 Subject: [PATCH] Fixed pixel align issue --- src/map/IMG/rastertile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index 82b3227a..fc5748ac 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -226,12 +226,12 @@ void RasterTile::drawPolygons(QPainter *painter) RectC r(poly.raster.rect()); QPointF tl(_map->ll2xy(r.topLeft())); QPointF br(_map->ll2xy(r.bottomRight())); - QSize size(QRectF(tl, br).toRect().size()); + QSizeF size(QRectF(tl, br).size()); SubFile::Handle hdl(poly.raster.lbl()); QPixmap pm(poly.raster.lbl()->image(hdl, poly.raster.id())); - qreal sx = (qreal)size.width() / (qreal)pm.width(); - qreal sy = (qreal)size.height() / (qreal)pm.height(); + qreal sx = size.width() / (qreal)pm.width(); + qreal sy = size.height() / (qreal)pm.height(); painter->save(); painter->scale(sx, sy);