public class LinearGradientBrushStyle extends BrushStyle
Modifier and Type | Field and Description |
---|---|
int[] |
colors |
float[] |
stops |
float |
x0 |
float |
x1 |
float |
y0 |
float |
y1 |
Constructor and Description |
---|
LinearGradientBrushStyle(float x0,
float y0,
float x1,
float y1,
int[] colors,
float[] stops)
Creates a new instance of
LinearGradientBrushStyle |
LinearGradientBrushStyle(float x0,
float y0,
float x1,
float y1,
int startColor,
int endColor)
Creates a new instance of
LinearGradientBrushStyle |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
getColor()
Gets the color for this PenStyle
|
int |
hashCode() |
void |
initPaint(android.graphics.Paint paint,
int x,
int y,
int width,
int height)
Init a Paint instance with values provided by this brush style
|
boolean |
isVisible()
Gets whether this style is visible
|
public final float x0
public final float x1
public final float y0
public final float y1
public final int[] colors
public final float[] stops
public LinearGradientBrushStyle(float x0, float y0, float x1, float y1, int[] colors, float[] stops)
LinearGradientBrushStyle
x0
- The x coordinate of the start point for linear gradienty0
- The y coordinate of the start point for linear gradientx1
- The x coordinate of the end point for linear gradienty1
- The y coordinate of the end point for linear gradientcolors
- The array with gradient colorsstops
- The array with gradient stopspublic LinearGradientBrushStyle(float x0, float y0, float x1, float y1, int startColor, int endColor)
LinearGradientBrushStyle
x0
- The x coordinate of the start point for linear gradienty0
- The y coordinate of the start point for linear gradientx1
- The x coordinate of the end point for linear gradienty1
- The y coordinate of the end point for linear gradientstartColor
- The start color of the gradientendColor
- The end color of the gradientpublic boolean isVisible()
public int getColor()
getColor
in class BrushStyle
public void initPaint(android.graphics.Paint paint, int x, int y, int width, int height)
initPaint
in class BrushStyle
paint
- The Paint to initx
- The X coordinates of area where Paint will be drawny
- The Y coordinates of area where Paint will be drawnwidth
- The width of area where Paint will be drawnheight
- The height of area where Paint will be drawnpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object