Class MapViewGeometryUtil
- java.lang.Object
-
- org.openstreetmap.josm.plugins.streetside.utils.MapViewGeometryUtil
-
public final class MapViewGeometryUtil extends java.lang.Object
Utility class to convert entities likeBoundsandStreetsideSequenceintoShapes that can then easily be drawn on aMapViewsGraphics2D-context.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateMapViewGeometryUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.geom.AreagetNonDownloadedArea(MapView mv, java.lang.Iterable<Bounds> downloadBounds)Subtracts the download bounds from the rectangular bounds of the map view.static java.awt.geom.Path2DgetSequencePath(NavigatableComponent nc, StreetsideSequence seq)Converts aStreetsideSequenceinto aPath2Dthat can be drawn on the specifiedNavigatableComponent'sGraphics2D-context.
-
-
-
Constructor Detail
-
MapViewGeometryUtil
private MapViewGeometryUtil()
-
-
Method Detail
-
getNonDownloadedArea
public static java.awt.geom.Area getNonDownloadedArea(MapView mv, java.lang.Iterable<Bounds> downloadBounds)
Subtracts the download bounds from the rectangular bounds of the map view.- Parameters:
mv- the MapView that is used for the LatLon-to-Point-conversion and that determines the Bounds from which the downloaded Bounds are subtracteddownloadBounds- multipleBoundsobjects that represent the downloaded area- Returns:
- the difference between the
MapViews bounds and the downloaded area
-
getSequencePath
public static java.awt.geom.Path2D getSequencePath(NavigatableComponent nc, StreetsideSequence seq)
Converts aStreetsideSequenceinto aPath2Dthat can be drawn on the specifiedNavigatableComponent'sGraphics2D-context.- Parameters:
nc- theNavigatableComponentfor which this conversion should be performed, typically aMapViewseq- the sequence to convert- Returns:
- the
Path2Dobject to which theStreetsideSequencehas been converted
-
-