mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Fixed pixel align issue
This commit is contained in:
parent
8589716a59
commit
7163441cb5
@ -226,12 +226,12 @@ void RasterTile::drawPolygons(QPainter *painter)
|
|||||||
RectC r(poly.raster.rect());
|
RectC r(poly.raster.rect());
|
||||||
QPointF tl(_map->ll2xy(r.topLeft()));
|
QPointF tl(_map->ll2xy(r.topLeft()));
|
||||||
QPointF br(_map->ll2xy(r.bottomRight()));
|
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());
|
SubFile::Handle hdl(poly.raster.lbl());
|
||||||
QPixmap pm(poly.raster.lbl()->image(hdl, poly.raster.id()));
|
QPixmap pm(poly.raster.lbl()->image(hdl, poly.raster.id()));
|
||||||
qreal sx = (qreal)size.width() / (qreal)pm.width();
|
qreal sx = size.width() / (qreal)pm.width();
|
||||||
qreal sy = (qreal)size.height() / (qreal)pm.height();
|
qreal sy = size.height() / (qreal)pm.height();
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
painter->scale(sx, sy);
|
painter->scale(sx, sy);
|
||||||
|
Loading…
Reference in New Issue
Block a user