org.openstreetmap.josm.plugins.streetside.utils

## 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 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 java.awt.geom.Area` | `getNonDownloadedArea(org.openstreetmap.josm.gui.MapView mv, java.lang.Iterable<org.openstreetmap.josm.data.Bounds> downloadBounds)` Subtracts the download bounds from the rectangular bounds of the map view.
    `static java.awt.geom.Path2D` | `getSequencePath(org.openstreetmap.josm.gui.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 java.awt.geom.Area getNonDownloadedArea(org.openstreetmap.josm.gui.MapView mv,
                                                                java.lang.Iterable<org.openstreetmap.josm.data.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 java.awt.geom.Path2D getSequencePath(org.openstreetmap.josm.gui.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