- java.lang.Object
-
- java.awt.MultipleGradientPaint
-
-
|
Modifier and Type |
Class and Description |
|
ColorSpaceType |
static class ColorSpaceType
The color space in which to perform the gradient interpolation.
-
The color space in which to perform the gradient interpolation.
- Since:
- 1.6
|
|
CycleMethod |
static class CycleMethod
The method to use when painting outside the gradient bounds.
-
The method to use when painting outside the gradient bounds.
- Since:
- 1.6
|
-
|
Modifier and Type |
Field and Description |
|
BITMASK |
static int BITMASK
Represents image data that is guaranteed to be either completely
opaque, with an alpha value of 1.0, or completely transparent,
with an alpha value of 0.0.
public static final int BITMASK
-
Represents image data that is guaranteed to be either completely
opaque, with an alpha value of 1.0, or completely transparent,
with an alpha value of 0.0.
- See Also:
- Constant Field Values
|
|
OPAQUE |
static int OPAQUE
Represents image data that is guaranteed to be completely opaque,
meaning that all pixels have an alpha value of 1.0.
public static final int OPAQUE
-
Represents image data that is guaranteed to be completely opaque,
meaning that all pixels have an alpha value of 1.0.
- See Also:
- Constant Field Values
|
|
TRANSLUCENT |
static int TRANSLUCENT
Represents image data that contains or might contain arbitrary
alpha values between and including 0.0 and 1.0.
public static final int TRANSLUCENT
-
Represents image data that contains or might contain arbitrary
alpha values between and including 0.0 and 1.0.
- See Also:
- Constant Field Values
|
-
|
Modifier and Type |
Method and Description |
|
createContext |
PaintContext createContext(java.awt.image.ColorModel cm,
Rectangle deviceBounds,
java.awt.geom.Rectangle2D userBounds,
java.awt.geom.AffineTransform xform,
RenderingHints hints)
Creates and returns a PaintContext used to
generate the color pattern.
public PaintContext createContext(java.awt.image.ColorModel cm,
Rectangle deviceBounds,
java.awt.geom.Rectangle2D userBounds,
java.awt.geom.AffineTransform xform,
RenderingHints hints)
-
Description copied from interface: Paint
Creates and returns a PaintContext used to
generate the color pattern.
The arguments to this method convey additional information
about the rendering operation that may be
used or ignored on various implementations of the Paint interface.
A caller must pass non- null values for all of the arguments
except for the ColorModel argument which may be null to
indicate that no specific ColorModel type is preferred.
Implementations of the Paint interface are allowed to use or ignore
any of the arguments as makes sense for their function, and are
not constrained to use the specified ColorModel for the returned
PaintContext , even if it is not null .
Implementations are allowed to throw NullPointerException for
any null argument other than the ColorModel argument,
but are not required to do so.
- Parameters:
cm - the preferred ColorModel which represents the most convenient
format for the caller to receive the pixel data, or null
if there is no preference.deviceBounds - the device space bounding box
of the graphics primitive being rendered.
Implementations of the Paint interface
are allowed to throw NullPointerException
for a null deviceBounds .userBounds - the user space bounding box
of the graphics primitive being rendered.
Implementations of the Paint interface
are allowed to throw NullPointerException
for a null userBounds .xform - the AffineTransform from user
space into device space.
Implementations of the Paint interface
are allowed to throw NullPointerException
for a null xform .hints - the set of hints that the context object can use to
choose between rendering alternatives.
Implementations of the Paint interface
are allowed to throw NullPointerException
for a null hints .
- Returns:
- the
PaintContext for
generating color patterns. - See Also:
PaintContext ,
ColorModel ,
Rectangle ,
Rectangle2D ,
AffineTransform ,
RenderingHints
|
|
getColors |
Returns a copy of the array of colors used by this gradient.
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
|
|
getColorSpace |
Returns the enumerated type which specifies color space for
interpolation.
-
Returns the enumerated type which specifies color space for
interpolation.
- Returns:
- the enumerated type which specifies color space for
interpolation
|
|
getCycleMethod |
Returns the enumerated type which specifies cycling behavior.
-
Returns the enumerated type which specifies cycling behavior.
- Returns:
- the enumerated type which specifies cycling behavior
|
|
getFractions |
float[] getFractions()
Returns a copy of the array of floats used by this gradient
to calculate color distribution.
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
|
|
getTransform |
java.awt.geom.AffineTransform getTransform()
Returns a copy of the transform applied to the gradient.
public final java.awt.geom.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
|
|
getTransparency |
int getTransparency()
Returns the transparency mode for this Paint object.
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:
Transparency
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
This document was created by
Dulcet from the OpenJDK sources.
Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.