Class LinearGradientBrushStyle
Defines brush style which allows to fill shapes with linear gradient
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class LinearGradientBrushStyle extends BrushStyle
Constructors
LinearGradientBrushStyle(float x0, float y0, float x1, float y1, int startColor, int endColor)
Creates a new instance of LinearGradientBrushStyle
Declaration
public LinearGradientBrushStyle(float x0, float y0, float x1, float y1, int startColor, int endColor)
Parameters
Type | Name | Description |
---|---|---|
float | x0 | The x coordinate of the start point for linear gradient |
float | y0 | The y coordinate of the start point for linear gradient |
float | x1 | The x coordinate of the end point for linear gradient |
float | y1 | The y coordinate of the end point for linear gradient |
int | startColor | The start color of the gradient |
int | endColor | The end color of the gradient |
LinearGradientBrushStyle(float x0, float y0, float x1, float y1, int[] colors, float[] stops)
Creates a new instance of LinearGradientBrushStyle
Declaration
public LinearGradientBrushStyle(float x0, float y0, float x1, float y1, int[] colors, float[] stops)
Parameters
Type | Name | Description |
---|---|---|
float | x0 | The x coordinate of the start point for linear gradient |
float | y0 | The y coordinate of the start point for linear gradient |
float | x1 | The x coordinate of the end point for linear gradient |
float | y1 | The y coordinate of the end point for linear gradient |
int[] | colors | The array with gradient colors |
float[] | stops | The array with gradient stops |
Fields
colors
Declaration
public final int[] colors
Field Value
Type | Description |
---|---|
int[] |
stops
Declaration
public final float[] stops
Field Value
Type | Description |
---|---|
float[] |
x0
Declaration
public final float x0
Field Value
Type | Description |
---|---|
float |
x1
Declaration
public final float x1
Field Value
Type | Description |
---|---|
float |
y0
Declaration
public final float y0
Field Value
Type | Description |
---|---|
float |
y1
Declaration
public final float y1
Field Value
Type | Description |
---|---|
float |
Methods
equals(Object o)
Declaration
public boolean equals(Object o)
Parameters
Type | Name | Description |
---|---|---|
Object | o |
Returns
Type | Description |
---|---|
boolean |
Overrides
getColor()
Gets the color for this PenStyle
Declaration
public int getColor()
Returns
Type | Description |
---|---|
int |
Overrides
hashCode()
Declaration
public int hashCode()
Returns
Type | Description |
---|---|
int |
Overrides
initPaint(Paint paint, float opacity, int x, int y, int width, int height)
Init a Paint instance with values provided by this brush style
Declaration
public void initPaint(Paint paint, float opacity, int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.Paint | paint | |
float | opacity | |
int | x | |
int | y | |
int | width | |
int | height |
Overrides
isVisible()
Gets whether this style is visible
Declaration
public boolean isVisible()
Returns
Type | Description |
---|---|
boolean |