public abstract class Effect extends Object
| 构造器和说明 |
|---|
Effect() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
animationEnter(float factor) |
abstract void |
animationExit(float factor) |
Effect |
clone() |
abstract void |
draw(Canvas canvas,
Paint paint)
Draw this shape into the provided Canvas, with the provided Paint.
|
float |
getHeight()
Returns the height of the Shape.
|
void |
getOutline(Outline outline)
Compute the Outline of the shape and return it in the supplied Outline
parameter.
|
float |
getWidth()
Returns the width of the Shape.
|
boolean |
hasAlpha()
Checks whether the Shape is opaque.
|
protected void |
onResize(float width,
float height)
Callback method called when
resize(float, float) is executed. |
void |
resize(float width,
float height)
Resizes the dimensions of this shape.
|
protected int |
setPaintAlpha(Paint paint,
int alpha)
Set the draw paint alpha by modulateAlpha
|
void |
touchCancel(float x,
float y) |
void |
touchDown(float x,
float y) |
void |
touchMove(float x,
float y) |
void |
touchReleased(float x,
float y) |
public final float getWidth()
public final float getHeight()
public abstract void draw(Canvas canvas, Paint paint)
resize(float, float).canvas - the Canvas within which this shape should be drawnpaint - the Paint object that defines this shape's characteristicspublic final void resize(float width,
float height)
draw(Canvas, Paint).width - the width of the shape (in pixels)height - the height of the shape (in pixels)public void touchCancel(float x,
float y)
public void touchDown(float x,
float y)
public void touchReleased(float x,
float y)
public void touchMove(float x,
float y)
public abstract void animationEnter(float factor)
public abstract void animationExit(float factor)
protected int setPaintAlpha(Paint paint, int alpha)
paint - Paintalpha - Alphapublic boolean hasAlpha()
protected void onResize(float width,
float height)
resize(float, float) is executed.width - the new width of the Shapeheight - the new height of the Shapepublic void getOutline(Outline outline)
outline is not changed.outline - The Outline to be populated with the result. Should not be null.public Effect clone() throws CloneNotSupportedException
clone 在类中 ObjectCloneNotSupportedException