Search in sources :

Example 11 with PointImageDrawable

use of net.osmand.plus.views.PointImageDrawable in project Osmand by osmandapp.

the class FavouritesLayer method drawBigPoint.

private void drawBigPoint(Canvas canvas, FavouritePoint favoritePoint, float x, float y, @Nullable MapMarker marker, float textScale) {
    PointImageDrawable pointImageDrawable;
    boolean history = false;
    if (marker != null) {
        pointImageDrawable = PointImageDrawable.getOrCreateSyncedIcon(view.getContext(), favouritesHelper.getColorWithCategory(favoritePoint, defaultColor), favoritePoint);
        history = marker.history;
    } else {
        pointImageDrawable = PointImageDrawable.getFromFavorite(view.getContext(), favouritesHelper.getColorWithCategory(favoritePoint, defaultColor), true, favoritePoint);
    }
    pointImageDrawable.drawPoint(canvas, x, y, textScale, history);
}
Also used : PointImageDrawable(net.osmand.plus.views.PointImageDrawable)

Aggregations

PointImageDrawable (net.osmand.plus.views.PointImageDrawable)11 ArrayList (java.util.ArrayList)6 QuadRect (net.osmand.data.QuadRect)6 LatLon (net.osmand.data.LatLon)5 OsmandApplication (net.osmand.plus.OsmandApplication)3 Paint (android.graphics.Paint)2 Pair (android.util.Pair)2 ColorInt (androidx.annotation.ColorInt)2 BackgroundType (net.osmand.data.FavouritePoint.BackgroundType)2 SelectedGpxPoint (net.osmand.plus.mapcontextmenu.controllers.SelectedGpxMenuController.SelectedGpxPoint)2 MapMarker (net.osmand.plus.mapmarkers.MapMarker)2 OsmNotesPoint (net.osmand.plus.plugins.osmedit.data.OsmNotesPoint)2 OsmPoint (net.osmand.plus.plugins.osmedit.data.OsmPoint)2 Context (android.content.Context)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 WptPt (net.osmand.GPXUtilities.WptPt)1 Amenity (net.osmand.data.Amenity)1 FavouritePoint (net.osmand.data.FavouritePoint)1 TransportStop (net.osmand.data.TransportStop)1