public class Brush extends Object
Modifier and Type | Field and Description |
---|---|
Color |
color
The color for the Brush.
|
static int |
defaultRule |
static int |
FADE |
int |
gradient
The gradient, set with setGradient().
|
static int |
NULL |
int |
rule
The fill rule.
|
static int |
RULE_EVEN_ODD |
static int |
RULE_NONZERO_WINDING |
static int |
SOLID
A Brush style.
|
int |
style
The style for the Brush.
|
Constructor and Description |
---|
Brush() |
Brush(Color color,
int style)
Create a new Brush Object.
|
Brush(Color color,
int style,
int rule)
Create a new Brush Object.
|
Modifier and Type | Method and Description |
---|---|
void |
cache() |
Brush |
change(Color differentColor)
Deprecated.
- use getCopy().set(Color) to do this.
Return a new Brush with a different color.
|
Color |
getBaseColor() |
static Brush |
getCached() |
static Brush |
getCached(Brush other) |
static Brush |
getCached(Color col,
int style) |
static Brush |
getCached(int r,
int g,
int b,
int style) |
Brush |
getCopy() |
int |
getFadeDirection() |
int |
getFadePercent() |
int |
getStyle() |
void |
set(Brush other) |
Brush |
set(Color color)
Change the color of this Brush and return itself.
|
Brush |
set(Color color,
int style)
Change the color and style of this Brush and return itself.
|
Brush |
setFade(int direction,
int fadePercent) |
public Color color
public int style
public int rule
public int gradient
public static final int RULE_NONZERO_WINDING
public static final int RULE_EVEN_ODD
public static int defaultRule
public static final int SOLID
public static final int NULL
public static final int FADE
public Brush()
public Brush(Color color, int style)
color
- The color for the Brush.style
- The style for the Brush. Currently only SOLID is supported.public Brush(Color color, int style, int rule)
color
- The color for the Brush.style
- The style for the Brush. Currently only SOLID is supported.rule
- one of the RULE_XXX values.public Brush change(Color differentColor)
differentColor
- public Brush setFade(int direction, int fadePercent)
public int getFadePercent()
public int getFadeDirection()
public Color getBaseColor()
public int getStyle()
public Brush set(Color color)
color
- the new Color for this brush.public Brush set(Color color, int style)
color
- the new Color for this brush.style
- the new style for this brush.public void set(Brush other)
public Brush getCopy()
public static Brush getCached(int r, int g, int b, int style)
public static Brush getCached()
public void cache()