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 floatDEFAULT_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 voiddestroy()voidrenderNode(RenderCallback renderCallback, RenderContext renderContext, PointOfInterest poi)voidrenderWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)voidscaleStrokeWidth(float scaleFactor, byte zoomLevel)Scales the stroke width of this RenderInstruction by the given factor.voidscaleTextSize(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:
destroyin classRenderInstruction
-
renderNode
public void renderNode(RenderCallback renderCallback, RenderContext renderContext, PointOfInterest poi)
- Specified by:
renderNodein classRenderInstruction- Parameters:
renderCallback- a reference to the receiver of all render callbacks.
-
renderWay
public void renderWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)
- Specified by:
renderWayin classRenderInstruction- Parameters:
renderCallback- a reference to the receiver of all render callbacks.
-
scaleStrokeWidth
public void scaleStrokeWidth(float scaleFactor, byte zoomLevel)Description copied from class:RenderInstructionScales the stroke width of this RenderInstruction by the given factor.- Specified by:
scaleStrokeWidthin 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:RenderInstructionScales the text size of this RenderInstruction by the given factor.- Specified by:
scaleTextSizein classRenderInstruction- Parameters:
scaleFactor- the factor by which the text size should be scaled.
-
-