Class Caption
- java.lang.Object
-
- org.mapsforge.map.rendertheme.renderinstruction.RenderInstruction
-
- org.mapsforge.map.rendertheme.renderinstruction.Caption
-
public class Caption extends RenderInstruction
Represents a text label on the map. If a bitmap symbol is present the caption position is calculated relative to the bitmap, the center of which is at the point of the POI. The bitmap itself is never rendered.
-
-
Field Summary
Fields Modifier and Type Field Description static float
DEFAULT_GAP
-
Fields inherited from class org.mapsforge.map.rendertheme.renderinstruction.RenderInstruction
category, displayModel, graphicFactory, height, percent, width
-
-
Constructor Summary
Constructors Constructor Description Caption(org.mapsforge.core.graphics.GraphicFactory graphicFactory, DisplayModel displayModel, java.lang.String elementName, org.xmlpull.v1.XmlPullParser pullParser, java.util.Map<java.lang.String,Symbol> symbols)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
renderNode(RenderCallback renderCallback, RenderContext renderContext, PointOfInterest poi)
void
renderWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)
void
scaleStrokeWidth(float scaleFactor, byte zoomLevel)
Scales the stroke width of this RenderInstruction by the given factor.void
scaleTextSize(float scaleFactor, byte zoomLevel)
Scales the text size of this RenderInstruction by the given factor.-
Methods inherited from class org.mapsforge.map.rendertheme.renderinstruction.RenderInstruction
computeBoundary, createBitmap, getCategory, scaleFromValue
-
-
-
-
Field Detail
-
DEFAULT_GAP
public static final float DEFAULT_GAP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Caption
public Caption(org.mapsforge.core.graphics.GraphicFactory graphicFactory, DisplayModel displayModel, java.lang.String elementName, org.xmlpull.v1.XmlPullParser pullParser, java.util.Map<java.lang.String,Symbol> symbols) throws org.xmlpull.v1.XmlPullParserException
- Throws:
org.xmlpull.v1.XmlPullParserException
-
-
Method Detail
-
destroy
public void destroy()
- Specified by:
destroy
in classRenderInstruction
-
renderNode
public void renderNode(RenderCallback renderCallback, RenderContext renderContext, PointOfInterest poi)
- Specified by:
renderNode
in classRenderInstruction
- Parameters:
renderCallback
- a reference to the receiver of all render callbacks.
-
renderWay
public void renderWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)
- Specified by:
renderWay
in classRenderInstruction
- Parameters:
renderCallback
- a reference to the receiver of all render callbacks.
-
scaleStrokeWidth
public void scaleStrokeWidth(float scaleFactor, byte zoomLevel)
Description copied from class:RenderInstruction
Scales the stroke width of this RenderInstruction by the given factor.- Specified by:
scaleStrokeWidth
in classRenderInstruction
- Parameters:
scaleFactor
- the factor by which the stroke width should be scaled.
-
scaleTextSize
public void scaleTextSize(float scaleFactor, byte zoomLevel)
Description copied from class:RenderInstruction
Scales the text size of this RenderInstruction by the given factor.- Specified by:
scaleTextSize
in classRenderInstruction
- Parameters:
scaleFactor
- the factor by which the text size should be scaled.
-
-