Class FeaturePaintCache
java.lang.Object
mil.nga.geopackage.tiles.features.FeaturePaintCache
Feature Paint Cache of Paint objects for each feature id and draw type
- Since:
- 3.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault max number of feature style paints to maintain -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the cachegetFeaturePaint(long styleId) Get the feature paint for the style row idgetFeaturePaint(StyleRow styleRow) Get the feature paint for the style rowandroid.graphics.PaintgetPaint(long styleId, FeatureDrawType type) Get the paint for the style row id and draw typeandroid.graphics.PaintgetPaint(StyleRow styleRow, FeatureDrawType type) Get the paint for the style row and draw typevoidresize(int maxSize) Resize the cachevoidsetPaint(long styleId, FeatureDrawType type, android.graphics.Paint paint) Set the paint for the style id and draw typevoidsetPaint(StyleRow styleRow, FeatureDrawType type, android.graphics.Paint paint) Set the paint for the style id and draw type
-
Field Details
-
DEFAULT_STYLE_PAINT_CACHE_SIZE
public static final int DEFAULT_STYLE_PAINT_CACHE_SIZEDefault max number of feature style paints to maintain- See Also:
-
-
Constructor Details
-
FeaturePaintCache
public FeaturePaintCache()Constructor -
FeaturePaintCache
public FeaturePaintCache(int size) Constructor- Parameters:
size- max paint objects to retain in the cache
-
-
Method Details
-
clear
public void clear()Clear the cache -
resize
public void resize(int maxSize) Resize the cache- Parameters:
maxSize- max size
-
getFeaturePaint
Get the feature paint for the style row- Parameters:
styleRow- style row- Returns:
- feature paint
-
getFeaturePaint
Get the feature paint for the style row id- Parameters:
styleId- style row id- Returns:
- feature paint
-
getPaint
Get the paint for the style row and draw type- Parameters:
styleRow- style rowtype- feature draw type- Returns:
- paint
-
getPaint
Get the paint for the style row id and draw type- Parameters:
styleId- style row idtype- feature draw type- Returns:
- paint
-
setPaint
Set the paint for the style id and draw type- Parameters:
styleRow- style rowtype- feature draw typepaint- paint
-
setPaint
Set the paint for the style id and draw type- Parameters:
styleId- style row idtype- feature draw typepaint- paint
-