Class RenderTheme
- java.lang.Object
-
- org.mapsforge.map.rendertheme.rule.RenderTheme
-
public class RenderTheme extends java.lang.Object
A RenderTheme defines how ways and nodes are drawn.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Must be called when this RenderTheme gets destroyed to clean up and free resources.int
getLevels()
int
getMapBackground()
int
getMapBackgroundOutside()
boolean
hasMapBackgroundOutside()
void
matchClosedWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)
Matches a closed way with the given parameters against this RenderTheme.void
matchHillShadings(StandardRenderer renderer, RenderContext renderContext)
void
matchLinearWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)
Matches a linear way with the given parameters against this RenderTheme.void
matchNode(RenderCallback renderCallback, RenderContext renderContext, PointOfInterest poi)
Matches a node with the given parameters against this RenderTheme.void
scaleStrokeWidth(float scaleFactor, byte zoomLevel)
Scales the stroke width of this RenderTheme by the given factor for a given zoom levelvoid
scaleTextSize(float scaleFactor, byte zoomLevel)
Scales the text size of this RenderTheme by the given factor for a given zoom level.void
traverseRules(Rule.RuleVisitor visitor)
-
-
-
Method Detail
-
destroy
public void destroy()
Must be called when this RenderTheme gets destroyed to clean up and free resources.
-
getLevels
public int getLevels()
- Returns:
- the number of distinct drawing levels required by this RenderTheme.
-
getMapBackground
public int getMapBackground()
- Returns:
- the map background color of this RenderTheme.
-
getMapBackgroundOutside
public int getMapBackgroundOutside()
- Returns:
- the background color that applies to areas outside the map.
-
hasMapBackgroundOutside
public boolean hasMapBackgroundOutside()
- Returns:
- true if map color is defined for outside areas.
-
matchClosedWay
public void matchClosedWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)
Matches a closed way with the given parameters against this RenderTheme.- Parameters:
renderCallback
- the callback implementation which will be executed on each match.renderContext
-way
-
-
matchLinearWay
public void matchLinearWay(RenderCallback renderCallback, RenderContext renderContext, PolylineContainer way)
Matches a linear way with the given parameters against this RenderTheme.- Parameters:
renderCallback
- the callback implementation which will be executed on each match.renderContext
-way
-
-
matchNode
public void matchNode(RenderCallback renderCallback, RenderContext renderContext, PointOfInterest poi)
Matches a node with the given parameters against this RenderTheme.- Parameters:
renderCallback
- the callback implementation which will be executed on each match.renderContext
-poi
- the point of interest.
-
scaleStrokeWidth
public void scaleStrokeWidth(float scaleFactor, byte zoomLevel)
Scales the stroke width of this RenderTheme by the given factor for a given zoom level- Parameters:
scaleFactor
- the factor by which the stroke width should be scaled.zoomLevel
- the zoom level to which this is applied.
-
scaleTextSize
public void scaleTextSize(float scaleFactor, byte zoomLevel)
Scales the text size of this RenderTheme by the given factor for a given zoom level.- Parameters:
scaleFactor
- the factor by which the text size should be scaled.zoomLevel
- the zoom level to which this is applied.
-
traverseRules
public void traverseRules(Rule.RuleVisitor visitor)
-
matchHillShadings
public void matchHillShadings(StandardRenderer renderer, RenderContext renderContext)
-
-