-
public final class GradientA 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classGradient.Companion
-
Field Summary
Fields Modifier and Type Field Description private final IntArraycolorsprivate final FloatArraystartPointsprivate final IntegercolorMapSize
-
Constructor Summary
Constructors Constructor Description Gradient(IntArray colors, FloatArray startPoints, Integer colorMapSize)Gradient(IntArray colors, FloatArray startPoints)
-
Method Summary
Modifier and Type Method Description final IntArraygetColors()final FloatArraygetStartPoints()final IntegergetColorMapSize()final IntArraygenerateColorMap(Double opacity)Generates a color map array from the gradient's colors and start points. final IntArraygenerateColorMap()Generates a color map array from the gradient's colors and start points. -
-
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
-
getStartPoints
final FloatArray getStartPoints()
-
getColorMapSize
final Integer getColorMapSize()
-
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.
-
-
-
-