From 2d50c6bd558126b520d96ec93d1838f8a5caa0c2 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 25 Mar 2020 21:23:18 +0100 Subject: [PATCH] Revert "fix terrain transparency" This reverts commit 3df3ff9b26242eb43e149cc8275209f56fe1e1c3. --- OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java index e63686dcb6..952ac4a498 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java @@ -59,13 +59,12 @@ public class TerrainLayer extends MapTileLayer { @Override public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings drawSettings) { int zoom = tileBox.getZoom(); - int transparency = 255 - (int) (2.55 * srtmPlugin.getTerrainTransparency()); if (zoom >= srtmPlugin.getTerrainMinZoom() && zoom <= srtmPlugin.getTerrainMaxZoom()) { - setAlpha(transparency); + setAlpha(srtmPlugin.getTerrainTransparency()); super.onPrepareBufferImage(canvas, tileBox, drawSettings); } else if(zoom > srtmPlugin.getTerrainMaxZoom()) { // backward compatibility 100 -> 20 with overscale - setAlpha(transparency / 5); + setAlpha(srtmPlugin.getTerrainTransparency() / 5); super.onPrepareBufferImage(canvas, tileBox, drawSettings); } else { // ignore