don't factor in the pixelratio to achieve the same look

refs #189
This commit is contained in:
Konstantin Käfer
2014-05-14 14:52:37 +02:00
parent a812f37c60
commit 24617da3ff

View File

@@ -175,8 +175,7 @@ void Painter::translateLayer(const std::array<float, 2> &translation, const Tile
if (translation[0] || translation[1]) {
const int direction = reverse ? -1 : 1;
// TODO: Get rid of the 8 (scaling from 4096 to tile size)
const double factor = direction * ((double)(1 << id.z)) / map.getState().getScale() /
map.getState().getPixelRatio() * (4096.0 / util::tileSize);
const double factor = direction * ((double)(1 << id.z)) / map.getState().getScale() * (4096.0 / util::tileSize);
matrix::translate(matrix, matrix, translation[0] * factor, translation[1] * factor, 0);
}
}
@@ -186,8 +185,7 @@ mat4 Painter::translatedMatrix(const std::array<float, 2> &translation, const Ti
return matrix;
} else {
// TODO: Get rid of the 8 (scaling from 4096 to tile size)
const double factor = ((double)(1 << id.z)) / map.getState().getScale() /
map.getState().getPixelRatio() * (4096.0 / util::tileSize);
const double factor = ((double)(1 << id.z)) / map.getState().getScale() * (4096.0 / util::tileSize);
mat4 result;
if (anchor == TranslateAnchor::Viewport) {