Most visited

Recently visited

Added in API level 1

OvalShape

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

Summary

Public constructors

OvalShape()

Public methods

void draw(Canvas canvas, Paint paint)

使用提供的Paint将此形状绘制到提供的Canvas中。

void getOutline(Outline outline)

计算形状的轮廓并将其返回到提供的大纲参数中。

Inherited methods

From class android.graphics.drawable.shapes.RectShape
From class android.graphics.drawable.shapes.Shape
From class java.lang.Object

Public constructors

OvalShape

Added in API level 1
OvalShape ()

Public methods

draw

Added in API level 1
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

getOutline

Added in API level 21
void getOutline (Outline outline)

计算形状的轮廓并将其返回到提供的大纲参数中。 默认实现什么都不做, outline不会改变。

Parameters
outline Outline: The Outline to be populated with the result. Should not be null.

Hooray!