public class RadialGradientBrush extends Brush
Constructor and Description |
---|
RadialGradientBrush()
Initializes a new instance of the
RadialGradientBrush class. |
RadialGradientBrush(Color centerColor,
Color surroundingColor)
Initializes a new instance of the
RadialGradientBrush class. |
RadialGradientBrush(Color centerColor,
Color surroundingColor,
double x,
double y)
Initializes a new instance of the
RadialGradientBrush class. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a clone of the brush.
|
android.graphics.Paint |
createPaint(android.graphics.RectF bounds)
Creates android.graphics.Paint object corresponding to this brush.
|
Color |
getCenterColor()
Gets the center color.
|
Color |
getSurroundingColor()
Gets the surrounding color.
|
double |
getX()
Gets the relative x-coordinate of the center point.
|
double |
getY()
Gets the relative y-coordinate of the center point.
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
void |
setCenterColor(Color value)
Sets the center color.
|
void |
setSurroundingColor(Color value)
Sets the surrounding color.
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
public RadialGradientBrush(Color centerColor, Color surroundingColor)
RadialGradientBrush
class.color1
- A Color
object representing
the color at the center point.color2
- A Color
object representing
the surrounding color.public RadialGradientBrush(Color centerColor, Color surroundingColor, double x, double y)
RadialGradientBrush
class.color1
- A Color
object representing
the color at the center point.color2
- A Color
object representing
the surrounding color.x
- The relative x-coordinate of the center point.
Value 0.5 indicates the middle of the destiation rectangle.x
- The relative y-coordinate of the center point.
Value 0.5 indicates the middle of the destiation rectangle.public RadialGradientBrush()
RadialGradientBrush
class.public java.lang.Object clone()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public Color getCenterColor()
Color
object representing the center color.public void setCenterColor(Color value)
public Color getSurroundingColor()
Color
object representing the surrounding color.public void setSurroundingColor(Color value)
public double getX()
public double getY()
public android.graphics.Paint createPaint(android.graphics.RectF bounds)
Brush
createPaint
in class Brush
bounds
- The bounds of the area where this brush will be applied.