public class ColorCurve extends Object
ColorCurve
class is a container to provide color and tonality
information. The main use of instances of this class is done in the
MultitoneOp
class, which uses instances of this class to convey
information of colors and tonality of those colors to mix together.
Instances of this class contain a Color
value and a tonality
curve, which is a 256 element array of intensity values in the range [0..1],
where 0 is no application of this color and 1 is full color intensity. The
elements of the array map to image luminance, where element 0 is taken for
pixels with most luminance and element 256 is taken for pixels with no
luminance.
Modifier and Type  Field and Description 

static int 
MAX_LEVEL
The number of levels supported by instances of this class

Constructor and Description 

ColorCurve(Color color)
Creates a
ColorCurve with the given color and the default
mapping. 
ColorCurve(ColorCurve colorCurve)
Creates a copy of the
ColorCurve instance. 
ColorCurve(Color color,
float[] curve)
Creates a
ColorCurve with the given color and an evenly
spaced interval table based on list of intensity points. 
ColorCurve(Color color,
float[] curve,
float[] intervals)
Creates a
ColorCurve with the given color and an interval
table based on list of intensity points where the interval distances
is also specified. 
public static final int MAX_LEVEL
public ColorCurve(ColorCurve colorCurve)
ColorCurve
instance. This copy
constructor copies the values of the other instance. That is external
modification of thos values has no influence on the newly created
instance.colorCurve
 public ColorCurve(Color color)
ColorCurve
with the given color and the default
mapping. The default mapping maps luminosity levels to the same intensity
levels.color
 The color to set in this ColorCurve
.public ColorCurve(Color color, float[] curve)
ColorCurve
with the given color and an evenly
spaced interval table based on list of intensity points.
Each entry of the curve parameter is in the range [0..1] and the length of the array is in the interval [2..256]. If the array has less than two entries it is ignored and the identity mapping is taken, if either an entry value is out of range or the curve array is longer than 256 entries, the result is undefined.
color
 The color described by this descriptorcurve
 The intensity perecentages for equally distributed
intervals or null
to use the identity map.public ColorCurve(Color color, float[] curve, float[] intervals)
ColorCurve
with the given color and an interval
table based on list of intensity points where the interval distances
is also specified.
Each entry of the curve parameter is in the range [0..1] and the length of the array is in the interval [2..256]. If the array has less than two entries it is ignored and the identity mapping is taken, if either an entry value is out of range or the curve array is longer than 256 entries, the result is undefined.
The intervals array must contain the one elements less than the curve
array, that is the predicate
curve.length  1 == intervals.length
must be
true
. If the intervals array is smaller or bigger than that,
it is ignored and the points are evenyl spaced !
The sum of entries of the intervals array defines the relative size of each interval. For example if the sum of the entries is 11, the first entry is 1, then the first intervall will take 23 steps, which is 256 * 1/11 because each step is 1/11th of the full range of 256.
color
 The color described by this descriptorcurve
 The intensity perecentages for the intervals or
null
to use the identity map (in which case the
intervals argument is ignored).intervals
 Normalized intervalls of curve values or
null
to evenly space the itensity levels
.public Color getColor()
public float getLevel(int step)
step
 The luminosity level for which to return this instances
intensity level.IndexOutOfBoundsException
 if step is less than 0 or higher than
MAX_LEVEL
."Copyright © 2010  2017 Adobe Systems Incorporated. All Rights Reserved"