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
Modifier and TypeFieldDescriptionstatic final int
Default max number of feature style paints to maintain -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the cachegetFeaturePaint
(long styleId) Get the feature paint for the style row idgetFeaturePaint
(StyleRow styleRow) Get the feature paint for the style rowgetPaint
(long styleId, FeatureDrawType type) Get the paint for the style row id and draw typegetPaint
(StyleRow styleRow, FeatureDrawType type) Get the paint for the style row and draw typevoid
resize
(int maxSize) Resize the cachevoid
setPaint
(long styleId, FeatureDrawType type, Paint paint) Set the paint for the style id and draw typevoid
setPaint
(StyleRow styleRow, FeatureDrawType type, 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
-