Package uk.ac.starlink.ttools.plot
Interface ColorTweaker
-
- All Known Subinterfaces:
DataColorTweaker
- All Known Implementing Classes:
ShaderTweaker
public interface ColorTweaker
Interface defining how a colour is changed from some input colour to some output colour. Two methods are defined which should perform the same transformation, but one uses Color objects and the other an sRGB array. Although it is possible to define each in terms of the other, performance can be improved considerably by implementing them both directly.- Since:
- 18 Jan 2006
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
tweakColor(float[] rgba)
Adjusts in place an array representing the sRGB components of a colour.java.awt.Color
tweakColor(java.awt.Color orig)
Returns a tweaked version of the submitted colour.
-
-
-
Method Detail
-
tweakColor
java.awt.Color tweakColor(java.awt.Color orig)
Returns a tweaked version of the submitted colour.- Parameters:
orig
- input colour- Returns:
- tweaked colour
-
tweakColor
void tweakColor(float[] rgba)
Adjusts in place an array representing the sRGB components of a colour. Each element is in the range 0..1 on both input and output.- Parameters:
rgba
- red, green, blue, alpha array
-
-