public class GradientFactory
extends java.lang.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 |
Constructor and Description |
---|
GradientFactory() |
Modifier and Type | Method and Description |
---|---|
protected static int[] |
createColors(org.graphstream.ui.graphicGraph.stylesheet.Style style) |
protected static float[] |
createFractions(org.graphstream.ui.graphicGraph.stylesheet.Style style) |
static Background |
gradientInArea(int x0,
int y0,
int width,
int height,
org.graphstream.ui.graphicGraph.stylesheet.Style style)
Generate a gradient in the given pixel area following the given style.
|
static Background |
linearGradientFromStyle(float x0,
float y0,
float x1,
float y1,
org.graphstream.ui.graphicGraph.stylesheet.Style style)
Generate a linear gradient between two given points corresponding to the
given style.
|
static Background |
radialGradientFromStyle(float cx,
float cy,
float radius,
float fx,
float fy,
org.graphstream.ui.graphicGraph.stylesheet.Style style)
Generate a radial gradient between whose center is at (cx,cy) with the
given radius.
|
static Background |
radialGradientFromStyle(float cx,
float cy,
float radius,
org.graphstream.ui.graphicGraph.stylesheet.Style style) |
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 static Background gradientInArea(int x0, int y0, int width, int height, org.graphstream.ui.graphicGraph.stylesheet.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 Background linearGradientFromStyle(float x0, float y0, float x1, float y1, org.graphstream.ui.graphicGraph.stylesheet.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 Background radialGradientFromStyle(float cx, float cy, float radius, org.graphstream.ui.graphicGraph.stylesheet.Style style)
public static Background radialGradientFromStyle(float cx, float cy, float radius, float fx, float fy, org.graphstream.ui.graphicGraph.stylesheet.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(org.graphstream.ui.graphicGraph.stylesheet.Style style)
protected static int[] createColors(org.graphstream.ui.graphicGraph.stylesheet.Style style)