Skip to content

Commit

Permalink
ScaleBar disappears sometimes fix by Erik Duisters, fixes openscience…
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Aug 31, 2016
1 parent b03fe48 commit 3a8db9c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vtm/src/org/oscim/scalebar/MapScaleBarLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public MapScaleBarLayer(Map map, MapScaleBar mapScaleBar) {
super(map);
this.mapScaleBar = mapScaleBar;

mRenderer = bitmapRenderer = new BitmapRenderer();
mRenderer = bitmapRenderer = new MapScaleBarRenderer();
bitmapRenderer.setBitmap(mapScaleBar.mapScaleBitmap, mapScaleBar.mapScaleBitmap.getWidth(), mapScaleBar.mapScaleBitmap.getHeight());
}

Expand Down
27 changes: 27 additions & 0 deletions vtm/src/org/oscim/scalebar/MapScaleBarRenderer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2016 Erik Duisters
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.scalebar;

import org.oscim.renderer.BitmapRenderer;
import org.oscim.renderer.GLState;
import org.oscim.renderer.GLViewport;

public class MapScaleBarRenderer extends BitmapRenderer {
@Override
public synchronized void render(GLViewport v) {
GLState.test(false, false);
super.render(v);
}
}

0 comments on commit 3a8db9c

Please sign in to comment.