Package 

Class Gradient


  • 
    public final class Gradient
    
                        

    A class to generate a color map from a given array of colors and the fractions that the colors represent by interpolating between their HSV values. This color map is to be used in the HeatmapTileProvider.

    • Constructor Detail

      • Gradient

        Gradient(IntArray colors, FloatArray startPoints, Integer colorMapSize)
        Parameters:
        colors - The colors to be used in the gradient.
        startPoints - The starting point for each color, given as a percentage of the maximum intensity.
        colorMapSize - The size of the colorMap to be generated by the Gradient.
      • Gradient

        Gradient(IntArray colors, FloatArray startPoints)
        Parameters:
        colors - The colors to be used in the gradient.
        startPoints - The starting point for each color, given as a percentage of the maximum intensity.
    • Method Detail

      • generateColorMap

        @JvmOverloads() final IntArray generateColorMap(Double opacity)

        Generates a color map array from the gradient's colors and start points. This map is a key component for rendering the heatmap, where each color corresponds to a different intensity level.

        The process involves interpolating between the specified colors in the HSV color space to create a smooth transition.

        Parameters:
        opacity - The overall opacity of the entire color map.
      • generateColorMap

        @JvmOverloads() final IntArray generateColorMap()

        Generates a color map array from the gradient's colors and start points. This map is a key component for rendering the heatmap, where each color corresponds to a different intensity level.

        The process involves interpolating between the specified colors in the HSV color space to create a smooth transition.