|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectandroid.graphics.drawable.shapes.Shape
public abstract class Shape
Defines a generic graphical "shape." Any Shape can be drawn to a Canvas with its own draw() method, but more graphical control is available if you instead pass it to a ShapeDrawable.
| Constructor Summary | |
|---|---|
Shape()
|
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Shape()
| Method Detail |
|---|
public final float getWidth()
public final float getHeight()
public abstract void draw(Canvas canvas,
Paint paint)
canvas - the Canvas within which this shape should be drawnpaint - the Paint object that defines this shape's characteristics
public final void resize(float width,
float height)
width - the width of the shape (in pixels)height - the height of the shape (in pixels)public boolean hasAlpha()
protected void onResize(float width,
float height)
width - the new width of the Shapeheight - the new height of the Shape
|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||