public static final class Map.Renderer extends Object implements AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
destroy()
Disposes the
Renderer . |
protected void |
finalize() |
boolean |
paint()
To be called by the host widget/component to paint.
|
Coordinate |
projectPointOnTerrain(Coordinate mapPoint)
Projects the given point by moving it up or down towards the terrain.
|
Image |
toImage()
|
public void close()
close
in interface AutoCloseable
public boolean paint()
For OpenGL you must ensure that we have a current context.
The invalidation callback mechanism (Map#setMapInvalidationCallback
) provides information on when something has changed on the Map
, and a repaint is needed. This allows to only call the paint()
method when it is needed.
@NotNull public Image toImage()
Map
to an Image
.
For OpenGL you must ensure that we have a current context. This method will not wait until all processing is done.
The image size is equal to the map
size
, multiplied by the display scale
.
@NotNull public Coordinate projectPointOnTerrain(@NotNull Coordinate mapPoint)
The projection is done along the axis that runs perpendicular to the ellipsoid surface at that point. If no terrain is available, the point is projected on the ellipsoid of the map reference
.
mapPoint
- a point in map coordinatespublic void destroy()