public class SimpleColorGenerator extends java.lang.Object implements OMGridGenerator
Modifier and Type | Class and Description |
---|---|
protected class |
SimpleColorGenerator.ByteRasterHelper |
protected class |
SimpleColorGenerator.CharRasterHelper |
protected class |
SimpleColorGenerator.DoubleRasterHelper |
protected class |
SimpleColorGenerator.FloatRasterHelper |
protected class |
SimpleColorGenerator.IntRasterHelper |
protected static interface |
SimpleColorGenerator.RasterHelper |
protected class |
SimpleColorGenerator.ShortRasterHelper |
Constructor and Description |
---|
SimpleColorGenerator() |
Modifier and Type | Method and Description |
---|---|
int |
calibratePointValue(int source)
Takes the value assigned to a pixel, as determined by it's location in
the grid, and gives a color to paint the pixel.
|
int[] |
createGreyscaleColors(int num_colors,
int opaqueness)
This method creates a set of greyscale colors.
|
OMGraphic |
generate(OMGrid grid,
Projection proj)
Going to return an OMRaster, sized to the current projection, and colored
according to the colortable.
|
protected SimpleColorGenerator.RasterHelper |
getRasterHelper(GridData gd) |
boolean |
needGenerateToRender()
We at least need one generate for XY and OFFSET grids.
|
public OMGraphic generate(OMGrid grid, Projection proj)
generate
in interface OMGridGenerator
grid
- the grid to create a raster for.proj
- description of the map.public int calibratePointValue(int source)
source
- a grid point value assigned to the raster pixel.public boolean needGenerateToRender()
needGenerateToRender
in interface OMGridGenerator
public int[] createGreyscaleColors(int num_colors, int opaqueness)
num_colors
- the number of greys needed.opaqueness
- how clear the color should be (0-255, where 0 is
clear).protected SimpleColorGenerator.RasterHelper getRasterHelper(GridData gd)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details