public class OvalShape
extends RectShape
| java.lang.Object | |||
| android.graphics.drawable.shapes.Shape | |||
| android.graphics.drawable.shapes.RectShape | |||
| android.graphics.drawable.shapes.OvalShape | |||
定义一个椭圆形状。 椭圆可以得出与自己的draw()方法的画布,但更多的图形控件可用,如果你不是通过OvalShape为ShapeDrawable 。
Public constructors |
|
|---|---|
OvalShape() |
|
公共方法(Public methods) |
|
|---|---|
void |
draw(Canvas canvas, Paint paint) 使用提供的Paint将此形状绘制到提供的Canvas中。 |
void |
getOutline(Outline outline) 计算形状的轮廓并将其返回到提供的大纲参数中。 |
继承方法(Inherited methods) |
|
|---|---|
android.graphics.drawable.shapes.RectShape
|
|
android.graphics.drawable.shapes.Shape
|
|
java.lang.Object
|
|
void draw (Canvas canvas, Paint paint)
使用提供的Paint将此形状绘制到提供的Canvas中。 在致电之前,您必须致电resize(float, float) 。
| 参数(Parameters) | |
|---|---|
canvas |
Canvas: the Canvas within which this shape should be drawn |
paint |
Paint: the Paint object that defines this shape's characteristics |
void getOutline (Outline outline)
计算形状的轮廓并将其返回到提供的大纲参数中。 默认实现什么都不做, outline不会改变。
| 参数(Parameters) | |
|---|---|
outline |
Outline: The Outline to be populated with the result. Should not be null. |