Package Summary  Overview Summary

class:MultipleGradientPaint [CHANGED]

All Implemented Interfaces:
Paint, Transparency
Direct Known Subclasses:
LinearGradientPaint, RadialGradientPaint

public abstract sealed class MultipleGradientPaintextends Object implements Paint permits LinearGradientPaint, RadialGradientPaint
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.
Sealed Class Hierarchy Graph:
Sealed class hierarchy graph for MultipleGradientPaintSealed class hierarchy graph for MultipleGradientPaint
Since:
1.6
All Implemented Interfaces:
Paint, Transparency
Direct Known Subclasses:
LinearGradientPaint, RadialGradientPaint

public abstract sealed class MultipleGradientPaintextends Object implements Paint permits LinearGradientPaint, RadialGradientPaint
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.
Since:
1.6
All Implemented Interfaces:
Paint, Transparency
Direct Known Subclasses:
LinearGradientPaint, RadialGradientPaint

public abstract sealed class MultipleGradientPaintextends Object implements Paint permits LinearGradientPaint, RadialGradientPaint
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.
Sealed Class Hierarchy Graph:
Sealed class hierarchy graph for MultipleGradientPaintSealed class hierarchy graph for MultipleGradientPaint
Since:
1.6

method:getFractions() [NONE]

  • 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
  • method:getColors() [NONE]

    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

    method:getCycleMethod() [NONE]

    getCycleMethod

    public final  MultipleGradientPaint.CycleMethod getCycleMethod()
    Returns the enumerated type which specifies cycling behavior.
    Returns:
    the enumerated type which specifies cycling behavior

    method:getColorSpace() [NONE]

    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

    method:getTransform() [NONE]

    getTransform

    public final  AffineTransform getTransform()
    Returns a copy of the transform applied to the gradient.

    Note that if no transform is applied to the gradient when it is created, the identity transform is used.

    Returns:
    a copy of the transform applied to the gradient

    method:getTransparency() [NONE]

    getTransparency

    public final  int getTransparency()
    Returns the transparency mode for this Paint object.
    Specified by:
    getTransparency in interface Transparency
    Returns:
    OPAQUE if all colors used by this Paint object are opaque, TRANSLUCENT if at least one of the colors used by this Paint object is not opaque.
    See Also:

    © 2023 Oracle Corporation and/or its affiliates