From 54d3fe332b2a1b63118f4b1bef33a17198e69dbc Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Sun, 24 Feb 2013 10:20:58 +0100 Subject: [PATCH] cleanups --- src/org/oscim/jni/TriangleJNI.java | 2 +- src/org/oscim/renderer/overlays/TestLineOverlay.java | 2 +- src/org/oscim/theme/renderinstruction/Line.java | 11 +++++++---- src/org/oscim/view/MapView.java | 4 +++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/org/oscim/jni/TriangleJNI.java b/src/org/oscim/jni/TriangleJNI.java index fc6332dd..1e1fcc05 100644 --- a/src/org/oscim/jni/TriangleJNI.java +++ b/src/org/oscim/jni/TriangleJNI.java @@ -53,7 +53,7 @@ public class TriangleJNI { * !!! NOT for general use!!! - this is specifically for ExtrusionLayer * . * - * @param points points to use: array of x,y coordinates + * @param points an array of x,y coordinates * @param numRings number of rings in polygon == outer(1) + inner rings * @param io input: 1. number of all points, 2.. number of points in rings - * times 2! diff --git a/src/org/oscim/renderer/overlays/TestLineOverlay.java b/src/org/oscim/renderer/overlays/TestLineOverlay.java index aeddbf4c..1d420e02 100644 --- a/src/org/oscim/renderer/overlays/TestLineOverlay.java +++ b/src/org/oscim/renderer/overlays/TestLineOverlay.java @@ -150,7 +150,7 @@ public class TestLineOverlay extends RenderOverlay { testProgram = GlUtils.createProgram(testVertexShader, testFragmentShader); if (testProgram == 0) { - Log.e("blah", "Could not create test program."); + Log.e("...", "Could not create test program."); return; } htestMatrix = GLES20.glGetUniformLocation(testProgram, "u_mvp"); diff --git a/src/org/oscim/theme/renderinstruction/Line.java b/src/org/oscim/theme/renderinstruction/Line.java index e01ea060..abdd566c 100644 --- a/src/org/oscim/theme/renderinstruction/Line.java +++ b/src/org/oscim/theme/renderinstruction/Line.java @@ -172,7 +172,9 @@ public final class Line extends RenderInstruction { public final float[] stippleColor; public final float stippleWidth; - private Line(int level, String style, float[] stroke, float width, + + + private Line(int level, String style, float[] color, float width, Cap cap, boolean fixed, int stipple, float[] stippleColor, float stippleWidth, int fade, float blur, boolean isOutline, float min) { @@ -194,8 +196,10 @@ public final class Line extends RenderInstruction { // paint.setPathEffect(new DashPathEffect(strokeDasharray, 0)); // } + //GlUtils.changeSaturation(color, 1.02f); + this.cap = cap; - this.color = stroke; + this.color = color; this.width = width; this.fixed = fixed; @@ -235,7 +239,7 @@ public final class Line extends RenderInstruction { this.fade = -1; this.stipple = stipple; this.stippleColor = null; - this.stippleWidth = 0; + this.stippleWidth = 0.6f; this.min = 0; color = GlUtils.colorToFloatP(stroke); } @@ -250,5 +254,4 @@ public final class Line extends RenderInstruction { // paint.setStrokeWidth(strokeWidth * scaleFactor); // } - } diff --git a/src/org/oscim/view/MapView.java b/src/org/oscim/view/MapView.java index 7180935c..91502208 100644 --- a/src/org/oscim/view/MapView.java +++ b/src/org/oscim/view/MapView.java @@ -193,7 +193,9 @@ public class MapView extends RelativeLayout { mOverlayManager.add(new BuildingOverlay(this)); mOverlayManager.add(new LabelingOverlay(this)); - // mOverlayManager.add(new GenericOverlay(this, new TestOverlay(this))); + //mOverlayManager.add(new GenericOverlay(this, new TestLineOverlay(this))); + //mOverlayManager.add(new GenericOverlay(this, new TestOverlay(this))); + // if (testRegionZoom) // mRegionLookup = new RegionLookup(this);