Package org.openstreetmap.josm.gui.layer
Class MapViewGraphics
java.lang.Object
org.openstreetmap.josm.gui.layer.MapViewGraphics
This class provides layers with access to drawing on the map view.
It contains information about the state of the map view.
In the future, it may add support for parallel drawing or layer caching.
It is intended to be used during MapView.paint(java.awt.Graphics)
- Since:
- 10458
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MapViewState.MapViewRectangleprivate final Graphics2Dprivate final MapView -
Constructor Summary
ConstructorsConstructorDescriptionMapViewGraphics(MapView mapView, Graphics2D graphics, MapViewState.MapViewRectangle clipBounds) Constructs a newMapViewGraphics. -
Method Summary
Modifier and TypeMethodDescriptionGets the clip bounds for this graphics instance.Gets theGraphics2Dyou should use to paint on this graphics object.Gets theMapViewthat is the base to this draw call.toString()
-
Field Details
-
graphics
-
mapView
-
clipBounds
-
-
Constructor Details
-
MapViewGraphics
public MapViewGraphics(MapView mapView, Graphics2D graphics, MapViewState.MapViewRectangle clipBounds) Constructs a newMapViewGraphics.- Parameters:
mapView- map viewgraphics- default graphicsclipBounds- clip bounds for this graphics instance
-
-
Method Details
-
getDefaultGraphics
Gets theGraphics2Dyou should use to paint on this graphics object. It may already have some data painted on it. You should paint your layer data on this graphics.- Returns:
- The
Graphics2Dinstance.
-
getMapView
Gets theMapViewthat is the base to this draw call.- Returns:
- The map view.
-
getClipBounds
Gets the clip bounds for this graphics instance.- Returns:
- The clip bounds.
-
toString
-