Package org.evoludo.simulator
Class ColorMapCSS.Gradient1D
- Enclosing class:
ColorMapCSS
One dimensional color gradient spanning two or more colors
-
Nested Class Summary
Nested classes/interfaces inherited from class ColorMap
ColorMap.Gradient<T>, ColorMap.Gradient1D<T>, ColorMap.Gradient2D<T>, ColorMap.GradientND<T>, ColorMap.Hue<T>, ColorMap.Index<T> -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGradient1D(Color[] colors, int nIncr) Construct color gradient running through all the colors in the arraycolors.Gradient1D(Color[] colors, int trait, int nIncr) Construct color gradient running through all the colors in the arraycolors.Gradient1D(Color start, Color end, int nIncr) Construct color gradient ranging from colorstartto colorendand interpolate withsteps-1intermediate colors.Gradient1D(Color start, Color end, int trait, int nIncr) Construct color gradient ranging from colorstartto colorendand interpolate withsteps-1intermediate colors. -
Method Summary
Modifier and TypeMethodDescriptioncolor2Color(Color color) Utility method to convert thecolorinto a color object of typeT.Methods inherited from class ColorMap.Gradient1D
binOf, setColor, setColor, setGradient, setGradient, setRange, translate, translate, translate, translateMethods inherited from class ColorMap.Gradient
interpolateColors, interpolateColorsMethods inherited from class ColorMap
addAlpha, addAlpha, addColors, blendColors, blendColors, translate, translate
-
Constructor Details
-
Gradient1D
Construct color gradient ranging from colorstartto colorendand interpolate withsteps-1intermediate colors. The resulting gradient spanssteps+1colors. The default range for mapping data values onto the color gradient is[0.0, 1.0].- Parameters:
start- the starting colorend- the ending colornIncr- the number of intermediate colors- See Also:
-
Gradient1D
Construct color gradient ranging from colorstartto colorendand interpolate withsteps-1intermediate colors. The resulting gradient spanssteps+1colors. The default range for mapping data values onto the color gradient is[0.0, 1.0].- Parameters:
start- the starting colorend- the ending colortrait- the index of the traitnIncr- the number of intermediate colors- See Also:
-
Gradient1D
Construct color gradient running through all the colors in the arraycolors. The number of interpolated intermediate colors between two subsequent entries incolorsis(steps-1)/(N-1), whereNis the number of colors incolors. The resulting gradient spanssteps+1colors. The default range for mapping data values onto the color gradient is[0.0, 1.0].- Parameters:
colors- the equally spaced reference colors of the gradientnIncr- the number of intermediate, gradient colors- See Also:
-
Gradient1D
Construct color gradient running through all the colors in the arraycolors. The number of interpolated intermediate colors between two subsequent entries incolorsis(steps-1)/(N-1), whereNis the number of colors incolors. The resulting gradient spanssteps+1colors. The default range for mapping data values onto the color gradient is[0.0, 1.0].- Parameters:
colors- the equally spaced reference colors of the gradienttrait- the index of the traitnIncr- the number of intermediate, gradient colors- See Also:
-
-
Method Details
-
color2Color
Description copied from class:ColorMapUtility method to convert thecolorinto a color object of typeT.- Specified by:
color2Colorin classColorMap<String>- Parameters:
color- the color to convert- Returns:
- the color represented as an object of type
T
-