Shader.TileMode| 限定符和类型 | 字段 | 说明 |
|---|---|---|
float[] |
positions |
Stores the positions of all colors in the
Shader#shaderColors array. |
float |
xCoordinate |
Indicates the X-axis coordinate of the center point of the
SweepShader. |
float |
yCoordinate |
Indicates the Y-axis coordinate of the center point of the
SweepShader. |
intColors, mTileMode, shaderColors| 构造器 | 说明 |
|---|---|
SweepShader() |
Default constructor used to create a
SweepShader. |
SweepShader(float xCoor,
float yCoor,
Color[] newColors,
float[] newPositions) |
A constructor used to create a
SweepShader based on the specified center point, colors,
and color positions. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
protected float[] |
getShaderPositions() |
Obtains the positions corresponding to the shading colors of a sweep shader.
|
protected float |
getShaderXCoordinate() |
Obtains the X-axis coordinate of the center point of a sweep shader.
|
protected float |
getShaderYCoordinate() |
Obtains the Y-axis coordinate of the center point of a sweep shader.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetShaderColors, getTileMode, setShaderMatrixpublic float[] positions
Shader#shaderColors array.
Color positions values monotonically increase from 0 to 1.0. If the values do not increase
monotonically, the drawing result may be unexpected. If the positions parameter is null, the colors
will be evenly shaded.
public float xCoordinate
SweepShader.public float yCoordinate
SweepShader.public SweepShader()
SweepShader.
Calling this constructor will automatically invoke
SweepShader#SweepShader(float,float,Color[],float[]) to create a sweep shader.
public SweepShader(float xCoor,
float yCoor,
Color[] newColors,
float[] newPositions)
SweepShader based on the specified center point, colors,
and color positions.xCoor - Indicates the X-axis coordinate of the center point.yCoor - Indicates the Y-axis coordinate of the center point.newColors - Indicates the array of sweep shading colors.newPositions - Indicates the positions of all colors in newColors. This parameter can be null.protected float getShaderXCoordinate()
protected float getShaderYCoordinate()
protected float[] getShaderPositions()