From 5d2a39a68df2d6cf8ba44dca2b71c43b6f55a5a9 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Thu, 10 Dec 2015 17:00:21 +0300 Subject: [PATCH] Fix icons for GPX layer --- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index e59d4af503..2d571d1a3f 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -10,6 +10,7 @@ import android.graphics.Paint.Align; import android.graphics.Paint.Style; import android.graphics.Path; import android.graphics.PointF; +import android.graphics.PorterDuff; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffColorFilter; import android.support.annotation.NonNull; @@ -294,6 +295,9 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex float y = tileBox.getPixYFromLatLon(o.lat, o.lon); if (intersects(boundIntersections, x, y, iconSize, iconSize)) { + boolean visit = isPointVisited(o); + int col = visit ? visitedColor : o.getColor(fcolor); + paintIcon.setColorFilter(new PorterDuffColorFilter(col, PorterDuff.Mode.MULTIPLY)); canvas.drawBitmap(pointSmall, x - pointSmall.getWidth() / 2, y - pointSmall.getHeight() / 2, paintIcon); } else { fullObjects.add(o);