public class GradientFactory extends Object
Modifier and Type | Field and Description |
---|---|
static float[][] |
predefFractions |
static float[] |
predefFractions10 |
static float[] |
predefFractions2 |
static float[] |
predefFractions3 |
static float[] |
predefFractions4 |
static float[] |
predefFractions5 |
static float[] |
predefFractions6 |
static float[] |
predefFractions7 |
static float[] |
predefFractions8 |
static float[] |
predefFractions9 |
static boolean |
version16 |
Constructor and Description |
---|
GradientFactory() |
Modifier and Type | Method and Description |
---|---|
protected static Color[] |
createColors(Style style) |
protected static float[] |
createFractions(Style style) |
static Paint |
gradientInArea(int x0,
int y0,
int width,
int height,
Style style)
Generate a gradient in the given pixel area following the given style.
|
static Paint |
linearGradientFromStyle(float x0,
float y0,
float x1,
float y1,
Style style)
Generate a linear gradient between two given points corresponding to the
given style.
|
static Paint |
radialGradientFromStyle(float cx,
float cy,
float radius,
float fx,
float fy,
Style style)
Generate a radial gradient between whose center is at (cx,cy) with the
given radius.
|
static Paint |
radialGradientFromStyle(float cx,
float cy,
float radius,
Style style) |
public static boolean version16
public static float[][] predefFractions
public static float[] predefFractions2
public static float[] predefFractions3
public static float[] predefFractions4
public static float[] predefFractions5
public static float[] predefFractions6
public static float[] predefFractions7
public static float[] predefFractions8
public static float[] predefFractions9
public static float[] predefFractions10
public GradientFactory()
public static Paint gradientInArea(int x0, int y0, int width, int height, Style style)
x0
- The left corner of the area.y0
- The bottom corner of the area.width
- The area width.height
- The area height.style
- The style.public static Paint linearGradientFromStyle(float x0, float y0, float x1, float y1, Style style)
x0
- The start point abscissa.y0
- The start point ordinate.x1
- The end point abscissa.y1
- The end point ordinate.style
- The style.public static Paint radialGradientFromStyle(float cx, float cy, float radius, Style style)
public static Paint radialGradientFromStyle(float cx, float cy, float radius, float fx, float fy, Style style)
cx
- The center point abscissa.cy
- The center point ordinate.fx
- The start point abscissa.fy
- The start point ordinate.radius
- The gradient radius.style
- The style.protected static float[] createFractions(Style style)
protected static Color[] createColors(Style style)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses