| java.lang.Object com.xoetrope.batik.ext.awt.MultipleGradientPaint
All known Subclasses: com.xoetrope.batik.ext.awt.RadialGradientPaint, com.xoetrope.batik.ext.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 author: Vincent Hardy version: $Id: MultipleGradientPaint.java,v 1.2 2006/08/31 09:28:47 val Exp $ |
Inner Class :public static class ColorSpaceEnum | |
Inner Class :public static class CycleMethodEnum | |
Field Summary | |
final public static ColorSpaceEnum | LINEAR_RGB Indicates that the color interpolation should occur in linearized
RGB space. | final public static CycleMethodEnum | NO_CYCLE Indicates (if the gradient starts or ends inside the target region)
to use the terminal colors to fill the remaining area. | final public static CycleMethodEnum | REFLECT Indicates (if the gradient starts or ends inside the target region),
to cycle the gradient colors start-to-end, end-to-start to fill the
remaining area. | final public static CycleMethodEnum | REPEAT Indicates (if the gradient starts or ends inside the target region),
to cycle the gradient colors start-to-end, start-to-end to fill the
remaining area. | final public static ColorSpaceEnum | SRGB Indicates that the color interpolation should occur in sRGB space. | protected ColorSpaceEnum | colorSpace The colorSpace in which to perform the interpolation. | protected Color[] | colors Gradient colors. | protected CycleMethodEnum | cycleMethod The method to use when painting out of the gradient bounds. | protected float[] | fractions Gradient keyframe values in the range 0 to 1. | protected AffineTransform | gradientTransform Transform to apply to gradient. | protected int | transparency Transparency. |
Constructor Summary | |
public | MultipleGradientPaint(float[] fractions, Color[] colors, CycleMethodEnum cycleMethod, ColorSpaceEnum colorSpace, AffineTransform gradientTransform) Superclass constructor, typical user should never have to call this. |
Method Summary | |
public ColorSpaceEnum | getColorSpace() Returns the enumerated type which specifies color space for
interpolation. | public Color[] | getColors() Returns a copy of the array of colors used by this gradient. | public CycleMethodEnum | getCycleMethod() Returns the enumerated type which specifies cycling behavior. | public float[] | getFractions() Returns a copy of the array of floats used by this gradient
to calculate color distribution. | public AffineTransform | getTransform() Returns a copy of the transform applied to the gradient. | public int | getTransparency() Returns the transparency mode for this LinearGradientPaint. |
LINEAR_RGB | final public static ColorSpaceEnum LINEAR_RGB(Code) | | Indicates that the color interpolation should occur in linearized
RGB space.
|
NO_CYCLE | final public static CycleMethodEnum NO_CYCLE(Code) | | Indicates (if the gradient starts or ends inside the target region)
to use the terminal colors to fill the remaining area. (default)
|
REFLECT | final public static CycleMethodEnum REFLECT(Code) | | Indicates (if the gradient starts or ends inside the target region),
to cycle the gradient colors start-to-end, end-to-start to fill the
remaining area.
|
REPEAT | final public static CycleMethodEnum REPEAT(Code) | | Indicates (if the gradient starts or ends inside the target region),
to cycle the gradient colors start-to-end, start-to-end to fill the
remaining area.
|
SRGB | final public static ColorSpaceEnum SRGB(Code) | | Indicates that the color interpolation should occur in sRGB space.
(default)
|
colorSpace | protected ColorSpaceEnum colorSpace(Code) | | The colorSpace in which to perform the interpolation.
|
cycleMethod | protected CycleMethodEnum cycleMethod(Code) | | The method to use when painting out of the gradient bounds.
|
fractions | protected float[] fractions(Code) | | Gradient keyframe values in the range 0 to 1.
|
transparency | protected int transparency(Code) | | Transparency.
|
MultipleGradientPaint | public MultipleGradientPaint(float[] fractions, Color[] colors, CycleMethodEnum cycleMethod, ColorSpaceEnum colorSpace, AffineTransform gradientTransform)(Code) | | Superclass constructor, typical user should never have to call this.
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 colorspace to use for interpolation,either SRGB or LINEAR_RGB Parameters: gradientTransform - transform to apply to the gradient throws: NullPointerException - if arrays are null, orgradientTransform is null throws: IllegalArgumentException - if fractions.length != colors.length,or if colors is less than 2 in size, or if an enumerated value is bad. |
getColorSpace | public ColorSpaceEnum getColorSpace()(Code) | | Returns the enumerated type which specifies color space for
interpolation.
the enumerated type which specifies color space forinterpolation |
getColors | public Color[] getColors()(Code) | | Returns a copy of the array of colors used by this gradient.
a copy of the array of colors used by this gradient |
getCycleMethod | public CycleMethodEnum getCycleMethod()(Code) | | Returns the enumerated type which specifies cycling behavior.
the enumerated type which specifies cycling behavior |
getFractions | public float[] getFractions()(Code) | | Returns a copy of the array of floats used by this gradient
to calculate color distribution.
a copy of the array of floats used by this gradient tocalculate color distribution |
getTransform | public AffineTransform getTransform()(Code) | | Returns a copy of the transform applied to the gradient.
a copy of the transform applied to the gradient. |
getTransparency | public int getTransparency()(Code) | | Returns the transparency mode for this LinearGradientPaint.
an integer value representing this LinearGradientPaint object'stransparency mode. |
|
|