MultipleGradientPaint (Java Platform SE 6) (original) (raw)
java.awt
Class MultipleGradientPaint
java.lang.Object
java.awt.MultipleGradientPaint
All Implemented Interfaces:
Direct Known Subclasses:
LinearGradientPaint, RadialGradientPaint
public abstract class MultipleGradientPaint
extends Object
implements Paint
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 toLinearGradientPaint
and RadialGradientPaint
.
Since:
1.6
Nested Class Summary | |
---|---|
static class | MultipleGradientPaint.ColorSpaceType The color space in which to perform the gradient interpolation. |
static class | MultipleGradientPaint.CycleMethod The method to use when painting outside the gradient bounds. |
Field Summary |
---|
Fields inherited from interface java.awt.Transparency |
---|
BITMASK, OPAQUE, TRANSLUCENT |
Method Summary | |
---|---|
Color[] | getColors() Returns a copy of the array of colors used by this gradient. |
MultipleGradientPaint.ColorSpaceType | getColorSpace() Returns the enumerated type which specifies color space for interpolation. |
MultipleGradientPaint.CycleMethod | 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. |
AffineTransform | getTransform() Returns a copy of the transform applied to the gradient. |
int | getTransparency() Returns the transparency mode for this Paint object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, [wait](../../java/lang/Object.html#wait%28long, int%29) |
Methods inherited from interface java.awt.Paint |
---|
[createContext](../../java/awt/Paint.html#createContext%28java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints%29) |
Method Detail |
---|
getFractions
public final float[] getFractions()
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.
Returns:
a copy of the array of floats used by this gradient to calculate color distribution
getColors
public final Color[] getColors()
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.
Returns:
a copy of the array of colors used by this gradient
getCycleMethod
public final MultipleGradientPaint.CycleMethod getCycleMethod()
Returns the enumerated type which specifies cycling behavior.
Returns:
the enumerated type which specifies cycling behavior
getColorSpace
public final MultipleGradientPaint.ColorSpaceType getColorSpace()
Returns the enumerated type which specifies color space for interpolation.
Returns:
the enumerated type which specifies color space for interpolation
getTransform
public final AffineTransform getTransform()
Returns a copy of the transform applied to the gradient.
Returns:
a copy of the transform applied to the gradient
getTransparency
public final int getTransparency()
Returns the transparency mode for this Paint object.
Specified by:
[getTransparency](../../java/awt/Transparency.html#getTransparency%28%29)
in interface [Transparency](../../java/awt/Transparency.html "interface in java.awt")
Returns:
an integer value representing the transparency mode for this Paint object
See Also:
Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
Scripting on this page tracks web page traffic, but does not change the content in any way.