public class BrushDrawable
extends android.graphics.drawable.ShapeDrawable
| Modifier and Type | Field and Description |
|---|---|
static int |
BRUSH_ELIPSE |
static int |
BRUSH_LINE |
static int |
BRUSH_RECTANGLE |
static int |
BRUSH_TRIANGLE |
static int |
ERASE_ELIPSE |
static int |
ERASE_LINE |
static int |
ERASE_RECTANGLE |
static int |
ERASE_TRIANGLE |
| Constructor and Description |
|---|
BrushDrawable(int type,
int width,
int height) |
BrushDrawable(int type,
int width,
int height,
int clearflags,
int setFlags) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPaintAlpha() |
android.graphics.PointF |
getPivot() |
float |
getPivotX() |
float |
getPivotY() |
float |
getRotation() |
android.graphics.Shader |
getShader() |
protected void |
onDraw(android.graphics.drawable.shapes.Shape shape,
android.graphics.Canvas canvas,
android.graphics.Paint paint)
#drawをOverrideしても良いけど、色々処理をしているので#onDrawの方をOverrideする
(#onDrawは#drawから呼び出される)
|
void |
setColor(int color) |
void |
setPaintAlpha(int alpha) |
void |
setPaintStyle(android.graphics.Paint.Style style) |
void |
setPivot(float pivotX,
float pivotY) |
void |
setRotation(float rotation) |
void |
setShader(android.graphics.Shader shader) |
void |
setType(int type,
int width,
int height) |
applyTheme, draw, getAlpha, getChangingConfigurations, getConstantState, getIntrinsicHeight, getIntrinsicWidth, getOpacity, getOutline, getPadding, getPaint, getShaderFactory, getShape, inflate, inflateTag, isStateful, mutate, onBoundsChange, onStateChange, setAlpha, setColorFilter, setDither, setIntrinsicHeight, setIntrinsicWidth, setPadding, setPadding, setShaderFactory, setShape, setTintList, setTintModecanApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getColorFilter, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getState, getTransparentRegion, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isVisible, jumpToCurrentState, onLayoutDirectionChanged, onLevelChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setVisible, unscheduleSelfpublic static final int ERASE_ELIPSE
public static final int ERASE_LINE
public static final int ERASE_TRIANGLE
public static final int ERASE_RECTANGLE
public static final int BRUSH_ELIPSE
public static final int BRUSH_LINE
public static final int BRUSH_TRIANGLE
public static final int BRUSH_RECTANGLE
public BrushDrawable(int type,
int width,
int height)
public BrushDrawable(int type,
int width,
int height,
int clearflags,
int setFlags)
protected void onDraw(android.graphics.drawable.shapes.Shape shape,
android.graphics.Canvas canvas,
android.graphics.Paint paint)
onDraw in class android.graphics.drawable.ShapeDrawablepublic void setPivot(float pivotX,
float pivotY)
public android.graphics.PointF getPivot()
public float getPivotX()
public float getPivotY()
public float getRotation()
public void setRotation(float rotation)
public void setType(int type,
int width,
int height)
public void setColor(int color)
public void setPaintAlpha(int alpha)
public int getPaintAlpha()
public android.graphics.Shader getShader()
public void setShader(android.graphics.Shader shader)
public void setPaintStyle(android.graphics.Paint.Style style)