toxi.color
Class LuminanceAccessor
java.lang.Object
toxi.color.AccessCriteria
toxi.color.LuminanceAccessor
- All Implemented Interfaces:
- java.util.Comparator<ReadonlyTColor>
public class LuminanceAccessor
- extends AccessCriteria
Compares 2 colors by their luminance values.
Fields inherited from class toxi.color.AccessCriteria |
ALPHA, BLACK, BLUE, BRIGHTNESS, CYAN, GREEN, HUE, LUMINANCE, MAGENTA, RED, SATURATION, YELLOW |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
LuminanceAccessor
public LuminanceAccessor()
compare
public int compare(ReadonlyTColor a,
ReadonlyTColor b)
getComponentValueFor
public float getComponentValueFor(ReadonlyTColor col)
- Specified by:
getComponentValueFor
in class AccessCriteria
setComponentValueFor
public void setComponentValueFor(TColor col,
float value)
- The setter for this accessor is not doing anything, since the luminance
of a color is a coputed value depending on 3 color channels.
- Specified by:
setComponentValueFor
in class AccessCriteria
- See Also:
AccessCriteria.setComponentValueFor(toxi.color.TColor,
float)