public abstract class

MultipleGradientPaint

extends Object
implements Paint
java.lang.Object
   ↳ java.awt.MultipleGradientPaint
Known Direct Subclasses

Class Overview

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.

Summary

Nested Classes
enum MultipleGradientPaint.ColorSpaceType The color space in which to perform the gradient interpolation. 
enum MultipleGradientPaint.CycleMethod The method to use when painting outside the gradient bounds. 
[Expand]
Inherited Constants
From interface java.awt.Transparency
Public Methods
final MultipleGradientPaint.ColorSpaceType getColorSpace()
Returns the enumerated type which specifies color space for interpolation.
final Color[] getColors()
Returns a copy of the array of colors used by this gradient.
final MultipleGradientPaint.CycleMethod getCycleMethod()
Returns the enumerated type which specifies cycling behavior.
final float[] getFractions()
Returns a copy of the array of floats used by this gradient to calculate color distribution.
final AffineTransform getTransform()
Returns a copy of the transform applied to the gradient.
final int getTransparency()
Returns the transparency mode for this Paint object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.awt.Paint
From interface java.awt.Transparency

Public Methods

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

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

public final MultipleGradientPaint.CycleMethod getCycleMethod ()

Returns the enumerated type which specifies cycling behavior.

Returns
  • the enumerated type which specifies cycling behavior

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

public final AffineTransform getTransform ()

Returns a copy of the transform applied to the gradient.

Returns
  • a copy of the transform applied to the gradient

public final int getTransparency ()

Returns the transparency mode for this Paint object.

Returns
  • an integer value representing the transparency mode for this Paint object
See Also