public class MapViewGraphics extends java.lang.Object
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)
Modifier and Type | Field and Description |
---|---|
private MapViewState.MapViewRectangle |
clipBounds |
private java.awt.Graphics2D |
graphics |
private MapView |
mapView |
Constructor and Description |
---|
MapViewGraphics(MapView mapView,
java.awt.Graphics2D graphics,
MapViewState.MapViewRectangle clipBounds)
Constructs a new
MapViewGraphics . |
Modifier and Type | Method and Description |
---|---|
MapViewState.MapViewRectangle |
getClipBounds()
Gets the clip bounds for this graphics instance.
|
java.awt.Graphics2D |
getDefaultGraphics()
Gets the
Graphics2D you should use to paint on this graphics object. |
MapView |
getMapView()
Gets the
MapView that is the base to this draw call. |
private final java.awt.Graphics2D graphics
private final MapViewState.MapViewRectangle clipBounds
public MapViewGraphics(MapView mapView, java.awt.Graphics2D graphics, MapViewState.MapViewRectangle clipBounds)
MapViewGraphics
.mapView
- map viewgraphics
- default graphicsclipBounds
- clip bounds for this graphics instancepublic java.awt.Graphics2D getDefaultGraphics()
Graphics2D
you 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.Graphics2D
instance.public MapView getMapView()
MapView
that is the base to this draw call.public MapViewState.MapViewRectangle getClipBounds()