Class FeaturePaintCache

java.lang.Object
mil.nga.geopackage.tiles.features.FeaturePaintCache

public class FeaturePaintCache extends Object
Feature Paint Cache of Paint objects for each feature id and draw type
Since:
3.2.0
  • Field Details

    • DEFAULT_STYLE_PAINT_CACHE_SIZE

      public static final int DEFAULT_STYLE_PAINT_CACHE_SIZE
      Default 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

      public FeaturePaint getFeaturePaint(StyleRow styleRow)
      Get the feature paint for the style row
      Parameters:
      styleRow - style row
      Returns:
      feature paint
    • getFeaturePaint

      public FeaturePaint getFeaturePaint(long styleId)
      Get the feature paint for the style row id
      Parameters:
      styleId - style row id
      Returns:
      feature paint
    • getPaint

      public Paint getPaint(StyleRow styleRow, FeatureDrawType type)
      Get the paint for the style row and draw type
      Parameters:
      styleRow - style row
      type - feature draw type
      Returns:
      paint
    • getPaint

      public Paint getPaint(long styleId, FeatureDrawType type)
      Get the paint for the style row id and draw type
      Parameters:
      styleId - style row id
      type - feature draw type
      Returns:
      paint
    • setPaint

      public void setPaint(StyleRow styleRow, FeatureDrawType type, Paint paint)
      Set the paint for the style id and draw type
      Parameters:
      styleRow - style row
      type - feature draw type
      paint - paint
    • setPaint

      public void setPaint(long styleId, FeatureDrawType type, Paint paint)
      Set the paint for the style id and draw type
      Parameters:
      styleId - style row id
      type - feature draw type
      paint - paint