public class ShaderTweaker extends Object implements DataColorTweaker
Constructor and Description |
---|
ShaderTweaker(int ioff,
Shader[] shaders,
double[][] ranges,
boolean[] logFlags,
boolean[] flipFlags)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static ShaderTweaker |
createTweaker(int ioff,
PlotState state)
Returns a new tweaker suitable for a given plot.
|
int |
getNcoord()
Returns the size of coordinate array which should be
submitted to
DataColorTweaker.setCoords(double[]) . |
boolean |
setCoords(double[] coords)
This implementation returns true unless the scaler results in a NaN
for any of the coordinates.
|
Color |
tweakColor(Color orig)
Returns a tweaked version of the submitted colour.
|
void |
tweakColor(float[] rgba)
Adjusts in place an array representing the sRGB components of a colour.
|
public ShaderTweaker(int ioff, Shader[] shaders, double[][] ranges, boolean[] logFlags, boolean[] flipFlags)
ioff
- offset into supplied coordinate arrays at which
auxiliary data startsshaders
- array of shaders, one for each aux axisranges
- array of (low,high) range bounds, one for each aux axislogFlags
- array of logarithmic scaling flags,
one for each aux axisflipFlags
- array of axis inversion flags,
one for each aux axispublic int getNcoord()
DataColorTweaker
DataColorTweaker.setCoords(double[])
.getNcoord
in interface DataColorTweaker
public boolean setCoords(double[] coords)
setCoords
in interface DataColorTweaker
coords
- full coordinate arraypublic void tweakColor(float[] rgba)
ColorTweaker
tweakColor
in interface ColorTweaker
rgba
- red, green, blue, alpha arraypublic Color tweakColor(Color orig)
ColorTweaker
tweakColor
in interface ColorTweaker
orig
- input colourpublic static ShaderTweaker createTweaker(int ioff, PlotState state)
ioff
- offset into supplied coordinate arrays at which
auxiliary data startsstate
- describes the plot for which this object will be usedCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.