|
|||||||||
| Home >> All >> org >> apache >> batik >> ext >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.batik.ext.awt
Class MultipleGradientPaint

java.lang.Objectorg.apache.batik.ext.awt.MultipleGradientPaint
- All Implemented Interfaces:
- java.awt.Paint, java.awt.Transparency
- Direct Known Subclasses:
- LinearGradientPaint, RadialGradientPaint
- public abstract class MultipleGradientPaint
- extends java.lang.Object
- implements java.awt.Paint
- extends java.lang.Object
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.
- Version:
- $Id: MultipleGradientPaint.java,v 1.7 2005/03/27 08:58:32 cam Exp $
| Nested Class Summary | |
static class |
MultipleGradientPaint.ColorSpaceEnum
Inner class to allow for typesafe enumerated ColorSpace values. |
static class |
MultipleGradientPaint.CycleMethodEnum
Inner class to allow for typesafe enumerated CycleMethod values. |
| Field Summary | |
protected java.awt.Color[] |
colors
Gradient colors. |
protected MultipleGradientPaint.ColorSpaceEnum |
colorSpace
The colorSpace in which to perform the interpolation. |
protected MultipleGradientPaint.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 java.awt.geom.AffineTransform |
gradientTransform
Transform to apply to gradient. |
static MultipleGradientPaint.ColorSpaceEnum |
LINEAR_RGB
Indicates that the color interpolation should occur in linearized RGB space. |
static MultipleGradientPaint.CycleMethodEnum |
NO_CYCLE
Indicates (if the gradient starts or ends inside the target region) to use the terminal colors to fill the remaining area. |
static MultipleGradientPaint.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. |
static MultipleGradientPaint.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. |
static MultipleGradientPaint.ColorSpaceEnum |
SRGB
Indicates that the color interpolation should occur in sRGB space. |
protected int |
transparency
Transparency. |
| Fields inherited from interface java.awt.Transparency |
BITMASK, OPAQUE, TRANSLUCENT |
| Constructor Summary | |
MultipleGradientPaint(float[] fractions,
java.awt.Color[] colors,
MultipleGradientPaint.CycleMethodEnum cycleMethod,
MultipleGradientPaint.ColorSpaceEnum colorSpace,
java.awt.geom.AffineTransform gradientTransform)
Superclass constructor, typical user should never have to call this. |
|
| Method Summary | |
java.awt.Color[] |
getColors()
Returns a copy of the array of colors used by this gradient. |
MultipleGradientPaint.ColorSpaceEnum |
getColorSpace()
Returns the enumerated type which specifies color space for interpolation. |
MultipleGradientPaint.CycleMethodEnum |
getCycleMethod()
Returns the enumerated type which specifies cycling behavior. |
float[] |
getFractions()
Returns a copy of the array of floats used by this gradient to calculate color distribution. |
java.awt.geom.AffineTransform |
getTransform()
Returns a copy of the transform applied to the gradient. |
int |
getTransparency()
Returns the transparency mode for this LinearGradientPaint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.Paint |
createContext |
| Field Detail |
transparency
protected int transparency
- Transparency.
fractions
protected float[] fractions
- Gradient keyframe values in the range 0 to 1.
colors
protected java.awt.Color[] colors
- Gradient colors.
gradientTransform
protected java.awt.geom.AffineTransform gradientTransform
- Transform to apply to gradient.
cycleMethod
protected MultipleGradientPaint.CycleMethodEnum cycleMethod
- The method to use when painting out of the gradient bounds.
colorSpace
protected MultipleGradientPaint.ColorSpaceEnum colorSpace
- The colorSpace in which to perform the interpolation.
NO_CYCLE
public static final MultipleGradientPaint.CycleMethodEnum NO_CYCLE
- Indicates (if the gradient starts or ends inside the target region)
to use the terminal colors to fill the remaining area. (default)
REFLECT
public static final MultipleGradientPaint.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.
REPEAT
public static final MultipleGradientPaint.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.
SRGB
public static final MultipleGradientPaint.ColorSpaceEnum SRGB
- Indicates that the color interpolation should occur in sRGB space.
(default)
LINEAR_RGB
public static final MultipleGradientPaint.ColorSpaceEnum LINEAR_RGB
- Indicates that the color interpolation should occur in linearized
RGB space.
| Constructor Detail |
MultipleGradientPaint
public MultipleGradientPaint(float[] fractions,
java.awt.Color[] colors,
MultipleGradientPaint.CycleMethodEnum cycleMethod,
MultipleGradientPaint.ColorSpaceEnum colorSpace,
java.awt.geom.AffineTransform gradientTransform)
- Superclass constructor, typical user should never have to call this.
| Method Detail |
getColors
public java.awt.Color[] getColors()
- Returns a copy of the array of colors used by this gradient.
getFractions
public float[] getFractions()
- Returns a copy of the array of floats used by this gradient
to calculate color distribution.
getTransparency
public int getTransparency()
- Returns the transparency mode for this LinearGradientPaint.
- Specified by:
getTransparencyin interfacejava.awt.Transparency
getCycleMethod
public MultipleGradientPaint.CycleMethodEnum getCycleMethod()
- Returns the enumerated type which specifies cycling behavior.
getColorSpace
public MultipleGradientPaint.ColorSpaceEnum getColorSpace()
- Returns the enumerated type which specifies color space for
interpolation.
getTransform
public java.awt.geom.AffineTransform getTransform()
- Returns a copy of the transform applied to the gradient.
|
|||||||||
| Home >> All >> org >> apache >> batik >> ext >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.batik.ext.awt.MultipleGradientPaint