public class Fill extends java.lang.Object implements RhythmSpecLayer
Inset
to draw
rectangles (margins, gutters etc).Modifier and Type | Class and Description |
---|---|
static class |
Fill.Factory
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FILL_COLOR |
protected android.graphics.Paint |
mPaint |
Constructor and Description |
---|
Fill()
Create a layer that fills current bounds with solid color
|
Modifier and Type | Method and Description |
---|---|
void |
draw(android.graphics.Canvas canvas,
android.graphics.Rect drawableBounds)
Draw itself to the provided canvas within provided bounds according to internal configuration (if any)
|
Fill |
setColor(int color)
Set fill color
|
public static final int DEFAULT_FILL_COLOR
protected android.graphics.Paint mPaint
public Fill setColor(int color)
color
- Fill color, in #AARRGGBB format as usualpublic void draw(android.graphics.Canvas canvas, android.graphics.Rect drawableBounds)
RhythmSpecLayer
draw
in interface RhythmSpecLayer
canvas
- Canvas for the layer to draw itself todrawableBounds
- Bounds where this layer should draw itself. Since these are the bounds of a RhythmDrawable
connected to the view, they are usually the same as the view’s bounds, so
you can use this parameter to get the view’s dimensions should you need them.