-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/libosmscout-client-qt/src/osmscoutclientqt/TiledRenderingHelper.cpp b/libosmscout-client-qt/src/osmscoutclientqt/TiledRenderingHelper.cpp | ||
index 9f6b45b9d..f8dd8776d 100644 | ||
--- a/libosmscout-client-qt/src/osmscoutclientqt/TiledRenderingHelper.cpp | ||
+++ b/libosmscout-client-qt/src/osmscoutclientqt/TiledRenderingHelper.cpp | ||
@@ -65,10 +65,16 @@ bool TiledRenderingHelper::RenderTiles(QPainter &painter, | ||
} | ||
} | ||
|
||
+ // enable subpixel rendering so that magnification up to 2x remains | ||
+ // as smooth as possible | ||
+ static constexpr double pitchFactor = 1.5; | ||
+ // the magnification level is adjusted taking into account the pixel | ||
+ // ratio of the request and the fixed dpi of the OSM tile | ||
projection.Set(request.coord, | ||
0, | ||
- request.magnification, | ||
- request.dpi, | ||
+ Magnification(request.magnification.GetMagnification() | ||
+ * pitchFactor * request.dpi / OSMTile::tileDPI()), | ||
+ OSMTile::tileDPI() / pitchFactor, | ||
width, | ||
height); | ||
|