|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tinyline.tiny2d.TinyPaint
The TinyPaint class defines paint servers in the ARGB color space.
With TinyPaint, you can define the following buid-in paint servers:
| Field Summary | |
TinyBuffer |
bitmap
The source of the bitmap (or pattern) color. |
static int |
FILL_BITMAP
The bitmap color |
static int |
FILL_LINEAR_GRADIENT
The linear gradient color |
static int |
FILL_PATTERN
The pattern (tiled bitmap) color |
static int |
FILL_RADIAL_GRADIENT
The radial gradient color |
static int |
FILL_SOLID
The solid color in the ARGB color space |
static int |
FILL_URI
The uri referenced color |
int |
fillType
The TinyColor type: FILL_SOLID, FILL_LINEAR_GRADIENT, FILL_RADIAL_GRADIENT, FILL_BITMAP, FILL_PATTERN, FILL_URI |
static int |
GRADIENT_PAD
Use the terminal colors of the gradient to fill the remainder of the target region |
static int |
GRADIENT_REFLECT
Reflect the gradient pattern start-to-end, end-to-start, start-to-end, etc. |
static int |
GRADIENT_REPEAT
Repeat the gradient pattern start-to-end, start-to-end, start-to-end, etc. |
TinyVector |
gStops
The list of gradient stops. |
TinyMatrix |
matrix
The additional TinyMatrix transform. |
static int |
OBJECT_BOUNDING_BOX
Use the coordinate system established by the bounding box of the element to which the paint is applied |
int |
r
The radius of the largest radial gradient circle. |
int |
spread
The gradient color spread method: GRADIENT_PAD, GRADIENT_REFLECT, GRADIENT_REPEAT |
int |
units
The paint units: USER_SPACE_ON_USE, OBJECT_BOUNDING_BOX |
TinyString |
uri
The uri provides the ID of the color the given color is refferred to |
static int |
USER_SPACE_ON_USE
Use the current user coordinate system |
int |
x1
The x-axis coordinate of the start of the linear gradient vector (or the x-axis coordinate of the center of the largest radial gradient circle). |
int |
x2
The x-axis coordinate of the end of the linear gradient vector. |
int |
y1
The y-axis coordinate of the start of the linear gradient vector (or the y-axis coordinate of the center of the largest radial gradient circle). |
int |
y2
The y-axis coordinate of the end of the linear gradient vector. |
| Constructor Summary | |
TinyPaint(int fillType)
Creates a specified gradient, bitmap or pattern TinyPaint object. |
|
| Method Summary | |
void |
addStop(int color,
int ratio)
Adds a gradient color stop. |
static void |
copy(TinyPaint dst,
TinyPaint src)
Creates a new TinyPaint as copy of the given 'source' TinyPaint. |
void |
createColorRamp()
Creates a gradient color ramp. |
static void |
init(TinyPaint paint,
int fillType)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int FILL_SOLID
public static final int FILL_LINEAR_GRADIENT
public static final int FILL_RADIAL_GRADIENT
public static final int FILL_BITMAP
public static final int FILL_PATTERN
public static final int FILL_URI
public int fillType
public TinyBuffer bitmap
public TinyString uri
public TinyMatrix matrix
public int x1
public int y1
public int x2
public int y2
public int r
public TinyVector gStops
public static final int GRADIENT_PAD
public static final int GRADIENT_REFLECT
public static final int GRADIENT_REPEAT
public int spread
public static final int USER_SPACE_ON_USE
public static final int OBJECT_BOUNDING_BOX
public int units
| Constructor Detail |
public TinyPaint(int fillType)
fillType - The type of the paint. It must be one of the
following types: FILL_LINEAR_GRADIENT, FILL_RADIAL_GRADIENT,
FILL_BITMAP, FILL_PATTERN.| Method Detail |
public static void init(TinyPaint paint,
int fillType)
public static void copy(TinyPaint dst,
TinyPaint src)
src - the source paint.
public void addStop(int color,
int ratio)
color - The stop color argb value.ratio - The stop color offset. The value must be in
the range [0,1] in the pixed point format.public void createColorRamp()
|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||