public class StandardRenderer extends java.lang.Object implements RenderCallback
MapDataStore
.Modifier and Type | Field and Description |
---|---|
org.mapsforge.core.graphics.GraphicFactory |
graphicFactory |
HillsRenderConfig |
hillsRenderConfig |
MapDataStore |
mapDataStore |
Constructor and Description |
---|
StandardRenderer(MapDataStore mapDataStore,
org.mapsforge.core.graphics.GraphicFactory graphicFactory,
boolean renderLabels)
Constructs a new StandardRenderer (without hillshading).
|
StandardRenderer(MapDataStore mapDataStore,
org.mapsforge.core.graphics.GraphicFactory graphicFactory,
boolean renderLabels,
HillsRenderConfig hillsRenderConfig)
Constructs a new StandardRenderer.
|
Modifier and Type | Method and Description |
---|---|
org.mapsforge.core.model.LatLong |
getStartPosition() |
java.lang.Byte |
getStartZoomLevel() |
byte |
getZoomLevelMax() |
protected void |
processReadMapData(RenderContext renderContext,
MapReadResult mapReadResult) |
void |
renderArea(RenderContext renderContext,
org.mapsforge.core.graphics.Paint fill,
org.mapsforge.core.graphics.Paint stroke,
int level,
PolylineContainer way)
Renders an area with the given parameters.
|
void |
renderAreaCaption(RenderContext renderContext,
org.mapsforge.core.graphics.Display display,
int priority,
java.lang.String caption,
float horizontalOffset,
float verticalOffset,
org.mapsforge.core.graphics.Paint fill,
org.mapsforge.core.graphics.Paint stroke,
org.mapsforge.core.graphics.Position position,
int maxTextWidth,
PolylineContainer way)
Renders an area caption with the given text.
|
void |
renderAreaSymbol(RenderContext renderContext,
org.mapsforge.core.graphics.Display display,
int priority,
org.mapsforge.core.graphics.Bitmap symbol,
PolylineContainer way)
Renders an area symbol with the given bitmap.
|
protected void |
renderPointOfInterest(RenderContext renderContext,
PointOfInterest pointOfInterest) |
void |
renderPointOfInterestCaption(RenderContext renderContext,
org.mapsforge.core.graphics.Display display,
int priority,
java.lang.String caption,
float horizontalOffset,
float verticalOffset,
org.mapsforge.core.graphics.Paint fill,
org.mapsforge.core.graphics.Paint stroke,
org.mapsforge.core.graphics.Position position,
int maxTextWidth,
PointOfInterest poi)
Renders a point of interest caption with the given text.
|
void |
renderPointOfInterestCircle(RenderContext renderContext,
float radius,
org.mapsforge.core.graphics.Paint fill,
org.mapsforge.core.graphics.Paint stroke,
int level,
PointOfInterest poi)
Renders a point of interest circle with the given parameters.
|
void |
renderPointOfInterestSymbol(RenderContext renderContext,
org.mapsforge.core.graphics.Display display,
int priority,
org.mapsforge.core.graphics.Bitmap symbol,
PointOfInterest poi)
Renders a point of interest symbol with the given bitmap.
|
protected void |
renderWaterBackground(RenderContext renderContext) |
void |
renderWay(RenderContext renderContext,
org.mapsforge.core.graphics.Paint stroke,
float dy,
int level,
PolylineContainer way)
Renders a way with the given parameters.
|
protected void |
renderWay(RenderContext renderContext,
PolylineContainer way) |
void |
renderWaySymbol(RenderContext renderContext,
org.mapsforge.core.graphics.Display display,
int priority,
org.mapsforge.core.graphics.Bitmap symbol,
float dy,
boolean alignCenter,
boolean repeat,
float repeatGap,
float repeatStart,
boolean rotate,
PolylineContainer way)
Renders a way with the given symbol along the way path.
|
void |
renderWayText(RenderContext renderContext,
org.mapsforge.core.graphics.Display display,
int priority,
java.lang.String textKey,
float dy,
org.mapsforge.core.graphics.Paint fill,
org.mapsforge.core.graphics.Paint stroke,
boolean repeat,
float repeatGap,
float repeatStart,
boolean rotate,
PolylineContainer way)
Renders a way with the given text along the way path.
|
public final org.mapsforge.core.graphics.GraphicFactory graphicFactory
public final HillsRenderConfig hillsRenderConfig
public final MapDataStore mapDataStore
public StandardRenderer(MapDataStore mapDataStore, org.mapsforge.core.graphics.GraphicFactory graphicFactory, boolean renderLabels)
mapDataStore
- the MapDataStore from which the map data will be read.public StandardRenderer(MapDataStore mapDataStore, org.mapsforge.core.graphics.GraphicFactory graphicFactory, boolean renderLabels, HillsRenderConfig hillsRenderConfig)
mapDataStore
- the MapDataStore from which the map data will be read.hillsRenderConfig
- optional relief shading support.public org.mapsforge.core.model.LatLong getStartPosition()
public java.lang.Byte getStartZoomLevel()
public byte getZoomLevelMax()
public void renderArea(RenderContext renderContext, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, int level, PolylineContainer way)
RenderCallback
renderArea
in interface RenderCallback
fill
- the paint to be used for rendering the area.stroke
- an optional paint for the area casing (may be null).public void renderAreaCaption(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, java.lang.String caption, float horizontalOffset, float verticalOffset, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, org.mapsforge.core.graphics.Position position, int maxTextWidth, PolylineContainer way)
RenderCallback
renderAreaCaption
in interface RenderCallback
display
- display modepriority
- priority levelcaption
- the text.horizontalOffset
- the horizontal offset of the text.verticalOffset
- the vertical offset of the text.fill
- the paint for the text.stroke
- the casing of the text (may be null).position
- optional position (may be null)maxTextWidth
- maximum text width .way
- the way for the caption.public void renderAreaSymbol(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, org.mapsforge.core.graphics.Bitmap symbol, PolylineContainer way)
RenderCallback
renderAreaSymbol
in interface RenderCallback
public void renderPointOfInterestCaption(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, java.lang.String caption, float horizontalOffset, float verticalOffset, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, org.mapsforge.core.graphics.Position position, int maxTextWidth, PointOfInterest poi)
RenderCallback
renderPointOfInterestCaption
in interface RenderCallback
caption
- the text to be rendered.horizontalOffset
- the horizontal offset of the caption.verticalOffset
- the vertical offset of the caption.fill
- the paint to be used for rendering the text.stroke
- an optional paint for the text casing (may be null).public void renderPointOfInterestCircle(RenderContext renderContext, float radius, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, int level, PointOfInterest poi)
RenderCallback
renderPointOfInterestCircle
in interface RenderCallback
radius
- the radius of the circle.fill
- the paint to be used for rendering the circle.stroke
- an optional paint for the circle casing (may be null).public void renderPointOfInterestSymbol(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, org.mapsforge.core.graphics.Bitmap symbol, PointOfInterest poi)
RenderCallback
renderPointOfInterestSymbol
in interface RenderCallback
public void renderWay(RenderContext renderContext, org.mapsforge.core.graphics.Paint stroke, float dy, int level, PolylineContainer way)
RenderCallback
renderWay
in interface RenderCallback
stroke
- the paint to be used for rendering the way.dy
- the offset of the way.public void renderWaySymbol(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, org.mapsforge.core.graphics.Bitmap symbol, float dy, boolean alignCenter, boolean repeat, float repeatGap, float repeatStart, boolean rotate, PolylineContainer way)
RenderCallback
renderWaySymbol
in interface RenderCallback
symbol
- the symbol to be rendered.dy
- the offset of the way.alignCenter
- true if the symbol should be centered, false otherwise.repeat
- true if the symbol should be repeated, false otherwise.repeatGap
- distance between repetitions.public void renderWayText(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, java.lang.String textKey, float dy, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, boolean repeat, float repeatGap, float repeatStart, boolean rotate, PolylineContainer way)
RenderCallback
renderWayText
in interface RenderCallback
textKey
- the text to be rendered.dy
- the offset of the way text.fill
- the paint to be used for rendering the text.protected void renderPointOfInterest(RenderContext renderContext, PointOfInterest pointOfInterest)
protected void renderWaterBackground(RenderContext renderContext)
protected void renderWay(RenderContext renderContext, PolylineContainer way)
protected void processReadMapData(RenderContext renderContext, MapReadResult mapReadResult)