org.openstreetmap.josm.plugins.streetside.utils

## Class MapViewGeometryUtil

- java.lang.Object
- - org.openstreetmap.josm.plugins.streetside.utils.MapViewGeometryUtil

-     public final class MapViewGeometryUtil
      extends Object

  Utility class to convert entities like `Bounds` and `StreetsideSequence` into `Shape`s that can then easily be drawn on a `MapView`s `Graphics2D`-context.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `MapViewGeometryUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Area` | `getNonDownloadedArea(MapView mv, Iterable<Bounds> downloadBounds)` Subtracts the download bounds from the rectangular bounds of the map view.
    `static Path2D` | `getSequencePath(NavigatableComponent nc, StreetsideSequence seq)` Converts a `StreetsideSequence` into a `Path2D` that can be drawn on the specified `NavigatableComponent`'s `Graphics2D`-context.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MapViewGeometryUtil

          private MapViewGeometryUtil()

  - ### Method Detail

    - #### getNonDownloadedArea

          public static Area getNonDownloadedArea(MapView mv,
                                                  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 subtracted
        `downloadBounds` - multiple `Bounds` objects that represent the downloaded area
      Returns:
        the difference between the `MapView`s bounds and the downloaded area

    - #### getSequencePath

          public static Path2D getSequencePath(NavigatableComponent nc,
                                               StreetsideSequence seq)

      Converts a `StreetsideSequence` into a `Path2D` that can be drawn on the specified `NavigatableComponent`'s `Graphics2D`-context.
      Parameters:
        `nc` - the `NavigatableComponent` for which this conversion should be performed, typically a `MapView`
        `seq` - the sequence to convert
      Returns:
        the `Path2D` object to which the `StreetsideSequence` has been converted

JOSM Plugins