API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. LinearGradientPaint View Source
Author(s)
Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
Since
1.6
Version
Serial
Hierarchy
 Object
      MultipleGradientPaint
          LinearGradientPaint
Implements
Subclasses
Description
publicfinal class LinearGradientPaint
  The LinearGradientPaint class provides a way to fill a Shape with a linear color gradient pattern.
Constructors
public LinearGradientPaint (float startX, float startY, float endX, float endY, float[] fractions, Color colors)
  Constructs a LinearGradientPaint with a default NO_CYCLE repeating method and SRGB color space.
public LinearGradientPaint (float startX, float startY, float endX, float endY, float[] fractions, Color colors, CycleMethod cycleMethod)
  Constructs a LinearGradientPaint with a default SRGB color space.
public LinearGradientPaint (Point2D start, Point2D end, float[] fractions, Color colors)
  Constructs a LinearGradientPaint with a default NO_CYCLE repeating method and SRGB color space.
public LinearGradientPaint (Point2D start, Point2D end, float[] fractions, Color colors, CycleMethod cycleMethod)
  Constructs a LinearGradientPaint with a default SRGB color space.
public LinearGradientPaint (Point2D start, Point2D end, float[] fractions, Color colors, CycleMethod cycleMethod, ColorSpaceType colorSpace, AffineTransform gradientTransform)
  Constructs a LinearGradientPaint.
Methods
Hide/Show inherited methods
public PaintContext createContext (ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
  Creates and returns a PaintContext used to generate the color pattern.
publicfinal Color getColors () [Inherited From MultipleGradientPaint]
  Returns a copy of the array of colors used by this gradient.
publicfinal ColorSpaceType getColorSpace () [Inherited From MultipleGradientPaint]
  Returns the enumerated type which specifies color space for interpolation.
publicfinal CycleMethod getCycleMethod () [Inherited From MultipleGradientPaint]
  Returns the enumerated type which specifies cycling behavior.
public Point2D getEndPoint ()
  Returns a copy of the end point of the gradient axis.
publicfinal float getFractions () [Inherited From MultipleGradientPaint]
  Returns a copy of the array of floats used by this gradient to calculate color distribution.
public Point2D getStartPoint ()
  Returns a copy of the start point of the gradient axis.
publicfinal AffineTransform getTransform () [Inherited From MultipleGradientPaint]
  Returns a copy of the transform applied to the gradient.
publicfinal int getTransparency () [Inherited From MultipleGradientPaint]
  Returns the transparency mode for this Paint object.
Fields
Hide/Show inherited fields
pack-privatefinal Color colors [Inherited From MultipleGradientPaint]
Gradient colors.
pack-privatefinal ColorSpaceType colorSpace [Inherited From MultipleGradientPaint]
The color space in which to perform the gradient interpolation.
pack-privatefinal CycleMethod cycleMethod [Inherited From MultipleGradientPaint]
The method to use when painting outside the gradient bounds.
pack-private int fastGradientArraySize [Inherited From MultipleGradientPaint]
pack-privatefinal float fractions [Inherited From MultipleGradientPaint]
Gradient keyframe values in the range 0 to 1.
pack-private SoftReference<int> gradient [Inherited From MultipleGradientPaint]
pack-private SoftReference<int> gradients [Inherited From MultipleGradientPaint]
pack-privatefinal AffineTransform gradientTransform [Inherited From MultipleGradientPaint]
Transform to apply to gradient.
pack-private boolean isSimpleLookup [Inherited From MultipleGradientPaint]
pack-private ColorModel model [Inherited From MultipleGradientPaint]
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.
pack-private float normalizedIntervals [Inherited From MultipleGradientPaint]
pack-privatefinal int transparency [Inherited From MultipleGradientPaint]
The transparency of this paint object.
Nested Classes
  MultipleGradientPaint.CycleMethod
The method to use when painting outside the gradient bounds.
  MultipleGradientPaint.ColorSpaceType
The color space in which to perform the gradient interpolation.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar