From 160f280ee1c6eec582c87ed5676b797840b05800 Mon Sep 17 00:00:00 2001 From: Andrew Davie Date: Fri, 1 Apr 2016 04:09:36 +1100 Subject: [PATCH] minor fixup - make sure Conveyor Render checks the track limits early-on --- OsmAnd/src/net/osmand/plus/views/Renderable.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/Renderable.java b/OsmAnd/src/net/osmand/plus/views/Renderable.java index aec1930ee1..db11f66b9c 100644 --- a/OsmAnd/src/net/osmand/plus/views/Renderable.java +++ b/OsmAnd/src/net/osmand/plus/views/Renderable.java @@ -84,6 +84,10 @@ public class Renderable { // view.refreshMap(); // force a redraw //} } + + public List getPoints() { + return points; + } } //---------------------------------------------------------------------------------------------- @@ -116,8 +120,8 @@ public class Renderable { double cullDistance = Math.pow(2.0, base - zoom); culler = new AsynchronousResampler.RamerDouglasPeucer(this, cullDistance); - if (zoom < newZoom) { // if line would look worse (we're zooming in) then... - culled = null; // use full-resolution until re-cull complete + if (zoom < newZoom) { // if line would look worse (we're zooming in) then... + culled = null; // use full-resolution until re-cull complete } zoom = newZoom; culler.execute(""); @@ -279,12 +283,8 @@ public class Renderable { @Override public void drawSingleSegment(Paint p, Canvas canvas, RotatedTileBox tileBox) { - // This is a simple/experimental track subsegment 'conveyor' animator just to show how - // effects of constant segment-size can be used for animation effects. I've put an arrowhead - // in just to show what can be done. Very hacky, it's just a "hey look at this". - if (culled != null && !culled.isEmpty() - /* && QuadRect.trivialOverlap(tileBox.getLatLonBounds(), trackBounds)*/ ) { + && QuadRect.trivialOverlap(tileBox.getLatLonBounds(), trackBounds)) { canvas.rotate(-tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY());