public abstract class MultipleGradientPaint extends Object implements Paint
| Modifier and Type | Class and Description |
|---|---|
static class |
MultipleGradientPaint.ColorSpaceType
Colors spaces for gradients.
|
static class |
MultipleGradientPaint.CycleMethod
Cycle methods for gradients.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MultipleGradientPaint(float[] fractions,
int[] colors,
MultipleGradientPaint.CycleMethod cycleMethod,
MultipleGradientPaint.ColorSpaceType colorSpace,
Transform gradientTransform)
Creates a new MultipleGradient paint
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getColors()
Gets the colors used in the gradient.
|
MultipleGradientPaint.ColorSpaceType |
getColorSpace()
Gets the color space for the gradient.
|
MultipleGradientPaint.CycleMethod |
getCycleMethod()
Gets the cycle method.
|
float[] |
getFractions()
Gets the fractional positions for the color gradients.
|
Transform |
getTransform()
Gets the gradient transform.
|
int |
getTransparency()
Gets the transparency for the gradient.
|
void |
setColors(int[] colors)
Sets the colors used in the gradient.
|
void |
setColorSpace(MultipleGradientPaint.ColorSpaceType colorSpaceType)
Sets the color space for the gradient.
|
void |
setCycleMethod(MultipleGradientPaint.CycleMethod cycleMethod)
Sets the cycle method.
|
void |
setFractions(float[] fractions)
Sets the fractional positions of the color gradients.
|
void |
setTransform(Transform transform)
Sets the transform for the gradient.
|
void |
setTransparency(int transparency)
Sets the transparency for the gradient.
|
protected MultipleGradientPaint(float[] fractions,
int[] colors,
MultipleGradientPaint.CycleMethod cycleMethod,
MultipleGradientPaint.ColorSpaceType colorSpace,
Transform gradientTransform)
fractions - The fractions representing positions where the corresponding color starts. Values between 0 and 1.colors - The colors that are part of the gradient. Should have same number of colors as fractions.cycleMethod - The cycle method for the gradient.colorSpace - The color space for the gradient.gradientTransform - Transform for the gradient. Not used.public MultipleGradientPaint.ColorSpaceType getColorSpace()
public void setColorSpace(MultipleGradientPaint.ColorSpaceType colorSpaceType)
colorSpaceType - the colorSpaceType to setpublic int[] getColors()
public void setColors(int[] colors)
colors - the colors to setpublic MultipleGradientPaint.CycleMethod getCycleMethod()
public void setCycleMethod(MultipleGradientPaint.CycleMethod cycleMethod)
cycleMethod - the cycleMethod to setpublic float[] getFractions()
public void setFractions(float[] fractions)
fractions - the fractions to setpublic Transform getTransform()
public void setTransform(Transform transform)
transform - the transform to setpublic int getTransparency()
public void setTransparency(int transparency)
transparency - the transparency to set