public class RadialGradient extends Shader
Shader.TileMode
Constructor and Description |
---|
RadialGradient(float centerX,
float centerY,
float radius,
int[] colors,
float[] stops,
Shader.TileMode tileMode)
Create a shader that draws a radial gradient given the center and radius.
|
RadialGradient(float centerX,
float centerY,
float radius,
int centerColor,
int edgeColor,
Shader.TileMode tileMode)
Create a shader that draws a radial gradient given the center and radius.
|
Modifier and Type | Method and Description |
---|---|
protected Shader |
copy() |
copyLocalMatrix, finalize, getLocalMatrix, getNativeInstance, init, setLocalMatrix
public RadialGradient(float centerX, float centerY, float radius, int[] colors, float[] stops, Shader.TileMode tileMode)
centerX
- The x-coordinate of the center of the radiuscenterY
- The y-coordinate of the center of the radiusradius
- Must be positive. The radius of the circle for this gradient.colors
- The colors to be distributed between the center and edge of the circlestops
- May be null
. Valid values are between 0.0f
and
1.0f
. The relative position of each corresponding color in
the colors array. If null
, colors are distributed evenly
between the center and edge of the circle.tileMode
- The Shader tiling modepublic RadialGradient(float centerX, float centerY, float radius, int centerColor, int edgeColor, Shader.TileMode tileMode)
centerX
- The x-coordinate of the center of the radiuscenterY
- The y-coordinate of the center of the radiusradius
- Must be positive. The radius of the circle for this gradientcenterColor
- The color at the center of the circle.edgeColor
- The color at the edge of the circle.tileMode
- The Shader tiling mode