public class RadialGradient
extends Shader
java.lang.Object | ||
↳ | android.graphics.Shader | |
↳ | android.graphics.RadialGradient |
Public constructors |
|
---|---|
RadialGradient(float centerX, float centerY, float radius, int[] colors, float[] stops, Shader.TileMode tileMode) 创建一个着色器,以给定中心和半径绘制径向渐变。 |
|
RadialGradient(float centerX, float centerY, float radius, int centerColor, int edgeColor, Shader.TileMode tileMode) 创建一个着色器,以给定中心和半径绘制径向渐变。 |
Inherited methods |
|
---|---|
From class android.graphics.Shader
|
|
From class java.lang.Object
|
RadialGradient (float centerX, float centerY, float radius, int[] colors, float[] stops, Shader.TileMode tileMode)
创建一个着色器,以给定中心和半径绘制径向渐变。
Parameters | |
---|---|
centerX |
float : The x-coordinate of the center of the radius |
centerY |
float : The y-coordinate of the center of the radius |
radius |
float : Must be positive. The radius of the circle for this gradient. |
colors |
int : The colors to be distributed between the center and edge of the circle |
stops |
float : 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 |
Shader.TileMode : The Shader tiling mode |
RadialGradient (float centerX, float centerY, float radius, int centerColor, int edgeColor, Shader.TileMode tileMode)
创建一个着色器,以给定中心和半径绘制径向渐变。
Parameters | |
---|---|
centerX |
float : The x-coordinate of the center of the radius |
centerY |
float : The y-coordinate of the center of the radius |
radius |
float : Must be positive. The radius of the circle for this gradient |
centerColor |
int : The color at the center of the circle. |
edgeColor |
int : The color at the edge of the circle. |
tileMode |
Shader.TileMode : The Shader tiling mode |