| |
|
| java.lang.Object java.awt.MultipleGradientPaint
All known Subclasses: java.awt.RadialGradientPaint, java.awt.LinearGradientPaint,
MultipleGradientPaint | abstract public class MultipleGradientPaint implements Paint(Code) | | This is the superclass for Paints which use a multiple color
gradient to fill in their raster. It provides storage for variables and
enumerated values common to
LinearGradientPaint and
RadialGradientPaint .
author: Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans since: 1.6 |
Inner Class :public static enum CycleMethod | |
Inner Class :public static enum ColorSpaceType | |
Method Summary | |
final public ColorSpaceType | getColorSpace() Returns the enumerated type which specifies color space for
interpolation. | final public Color[] | getColors() Returns a copy of the array of colors used by this gradient. | final public CycleMethod | getCycleMethod() Returns the enumerated type which specifies cycling behavior. | final public float[] | getFractions() Returns a copy of the array of floats used by this gradient
to calculate color distribution. | final public AffineTransform | getTransform() Returns a copy of the transform applied to the gradient. | final public int | getTransparency() Returns the transparency mode for this Paint object. |
colorSpace | final ColorSpaceType colorSpace(Code) | | The color space in which to perform the gradient interpolation.
|
cycleMethod | final CycleMethod cycleMethod(Code) | | The method to use when painting outside the gradient bounds.
|
fastGradientArraySize | int fastGradientArraySize(Code) | | |
fractions | final float[] fractions(Code) | | Gradient keyframe values in the range 0 to 1.
|
isSimpleLookup | boolean isSimpleLookup(Code) | | |
model | ColorModel model(Code) | | The following fields are used only by MultipleGradientPaintContext
to cache certain values that remain constant and do not need to be
recalculated for each context created from this paint instance.
|
normalizedIntervals | float[] normalizedIntervals(Code) | | |
transparency | final int transparency(Code) | | The transparency of this paint object.
|
MultipleGradientPaint | MultipleGradientPaint(float[] fractions, Color[] colors, CycleMethod cycleMethod, ColorSpaceType colorSpace, AffineTransform gradientTransform)(Code) | | Package-private constructor.
Parameters: fractions - numbers ranging from 0.0 to 1.0 specifying thedistribution of colors along the gradient Parameters: colors - array of colors corresponding to each fractional value Parameters: cycleMethod - either NO_CYCLE , REFLECT ,or REPEAT Parameters: colorSpace - which color space to use for interpolation, either SRGB or LINEAR_RGB Parameters: gradientTransform - transform to apply to the gradient throws: NullPointerException - if fractions array is null,or colors array is null,or gradientTransform is null,or cycleMethod is null,or colorSpace is null throws: IllegalArgumentException - if fractions.length != colors.length ,or colors is less than 2 in size,or a fractions value is less than 0.0 or greater than 1.0,or the fractions are not provided in strictly increasing order |
getColorSpace | final public ColorSpaceType getColorSpace()(Code) | | Returns the enumerated type which specifies color space for
interpolation.
the enumerated type which specifies color space forinterpolation |
getColors | final public Color[] getColors()(Code) | | Returns a copy of the array of colors used by this gradient.
The first color maps to the first value in the fractions array,
and the last color maps to the last value in the fractions array.
a copy of the array of colors used by this gradient |
getCycleMethod | final public CycleMethod getCycleMethod()(Code) | | Returns the enumerated type which specifies cycling behavior.
the enumerated type which specifies cycling behavior |
getFractions | final public float[] getFractions()(Code) | | Returns a copy of the array of floats used by this gradient
to calculate color distribution.
The returned array always has 0 as its first value and 1 as its
last value, with increasing values in between.
a copy of the array of floats used by this gradient tocalculate color distribution |
getTransform | final public AffineTransform getTransform()(Code) | | Returns a copy of the transform applied to the gradient.
a copy of the transform applied to the gradient |
getTransparency | final public int getTransparency()(Code) | | Returns the transparency mode for this Paint object.
an integer value representing the transparency mode forthis Paint object See Also: java.awt.Transparency |
|
|
|