Paint
, Transparency
LinearGradientPaint
, RadialGradientPaint
public abstract sealed class MultipleGradientPaint extends Object implements Paint permits LinearGradientPaint, RadialGradientPaint
LinearGradientPaint
and RadialGradientPaint
.Modifier and Type | Class | Description |
---|---|---|
static enum |
MultipleGradientPaint.ColorSpaceType |
The color space in which to perform the gradient interpolation. |
static enum |
MultipleGradientPaint.CycleMethod |
The method to use when painting outside the gradient bounds. |
BITMASK, OPAQUE, TRANSLUCENT
Modifier and Type | Method | Description |
---|---|---|
final Color[] |
getColors() |
Returns a copy of the array of colors used by this gradient. |
final MultipleGradientPaint.ColorSpaceType |
getColorSpace() |
Returns the enumerated type which specifies color space for interpolation. |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createContext
public final float[] getFractions()
public final Color[] getColors()
public final MultipleGradientPaint.CycleMethod getCycleMethod()
public final MultipleGradientPaint.ColorSpaceType getColorSpace()
public final AffineTransform getTransform()
Note that if no transform is applied to the gradient when it is created, the identity transform is used.
public final int getTransparency()
Paint
object.getTransparency
in interface Transparency
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.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/java/awt/MultipleGradientPaint.html