public class FeaturePaintCache extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_STYLE_PAINT_CACHE_SIZE
Default max number of feature style paints to maintain
|
| Constructor and Description |
|---|
FeaturePaintCache()
Constructor
|
FeaturePaintCache(int size)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the cache
|
FeaturePaint |
getFeaturePaint(long styleId)
Get the feature paint for the style row id
|
FeaturePaint |
getFeaturePaint(StyleRow styleRow)
Get the feature paint for the style row
|
Paint |
getPaint(long styleId,
FeatureDrawType type)
Get the paint for the style row id and draw type
|
Paint |
getPaint(StyleRow styleRow,
FeatureDrawType type)
Get the paint for the style row and draw type
|
void |
resize(int maxSize)
Resize the cache
|
void |
setPaint(long styleId,
FeatureDrawType type,
Paint paint)
Set the paint for the style id and draw type
|
void |
setPaint(StyleRow styleRow,
FeatureDrawType type,
Paint paint)
Set the paint for the style id and draw type
|
public static final int DEFAULT_STYLE_PAINT_CACHE_SIZE
public FeaturePaintCache()
public FeaturePaintCache(int size)
size - max paint objects to retain in the cachepublic void clear()
public void resize(int maxSize)
maxSize - max sizepublic FeaturePaint getFeaturePaint(StyleRow styleRow)
styleRow - style rowpublic FeaturePaint getFeaturePaint(long styleId)
styleId - style row idpublic Paint getPaint(StyleRow styleRow, FeatureDrawType type)
styleRow - style rowtype - feature draw typepublic Paint getPaint(long styleId, FeatureDrawType type)
styleId - style row idtype - feature draw typepublic void setPaint(StyleRow styleRow, FeatureDrawType type, Paint paint)
styleRow - style rowtype - feature draw typepaint - paintpublic void setPaint(long styleId,
FeatureDrawType type,
Paint paint)
styleId - style row idtype - feature draw typepaint - paint