public class GradientColorMapGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HEX_INLINEVALUE_MARKER |
static String |
HEX2_INLINEVALUE_MARKER |
static String |
RGB_INLINEVALUE_MARKER |
static String |
RGBA_INLINEVALUE_MARKER |
Modifier and Type | Method and Description |
---|---|
ColorMap |
generateColorMap(double min,
double max)
Generate a
ColorMap object, by updating the ColorMapEntries quantities on top of the
min and max values reported here. |
static GradientColorMapGenerator |
getColorMapGenerator(File file)
Get an SVG ColorMap generator for the specified file
|
static GradientColorMapGenerator |
getColorMapGenerator(String colorValues)
Get an SVG ColorMap generator for the specified file
|
static Color |
hex2Rgb(String colorStr)
Convert an hex color representation to a
Color |
void |
setAfterColor(Color color)
Sets the color to be used after the max value.
|
void |
setAfterColor(String color)
Sets the color to be used after the max value, as a string, it accepts the same syntax as
getColorMapGenerator(String) |
void |
setBeforeColor(Color color)
Sets the color to be used before the min value.
|
void |
setBeforeColor(String color)
Sets the color to be used before the min value, as a string, it accepts the same syntax as
getColorMapGenerator(String) |
public static final String RGB_INLINEVALUE_MARKER
public static final String RGBA_INLINEVALUE_MARKER
public static final String HEX_INLINEVALUE_MARKER
public static final String HEX2_INLINEVALUE_MARKER
public void setBeforeColor(Color color)
public void setBeforeColor(String color)
getColorMapGenerator(String)
public void setAfterColor(Color color)
public void setAfterColor(String color)
getColorMapGenerator(String)
public ColorMap generateColorMap(double min, double max)
ColorMap
object, by updating the ColorMapEntries quantities on top of the
min and max values reported here.public static GradientColorMapGenerator getColorMapGenerator(File file) throws SAXException, IOException, ParserConfigurationException
public static GradientColorMapGenerator getColorMapGenerator(String colorValues) throws IOException, ParserConfigurationException
colorValues
- ";" separated list of colors in the form c1;c2;c3;... where each color can
use syntaxes as rgb(r0,g0,b0), rgba(r0,g0,b0,alpha_0_to_1), #RRGGBB or 0xRRGGBBIOException
ParserConfigurationException
Copyright © 1996–2023 Geotools. All rights reserved.