FileDocCategorySizeDatePackage
OvalShape.javaAPI DocAndroid 5.1 API1470Thu Mar 12 22:22:30 GMT 2015android.graphics.drawable.shapes

OvalShape

public class OvalShape extends RectShape
Defines an oval shape. The oval can be drawn to a Canvas with its own draw() method, but more graphical control is available if you instead pass the OvalShape to a {@link android.graphics.drawable.ShapeDrawable}.

Fields Summary
Constructors Summary
public OvalShape()

Methods Summary
public voiddraw(android.graphics.Canvas canvas, android.graphics.Paint paint)

        canvas.drawOval(rect(), paint);
    
public voidgetOutline(android.graphics.Outline outline)

        final RectF rect = rect();
        outline.setOval((int) Math.ceil(rect.left), (int) Math.ceil(rect.top),
                (int) Math.floor(rect.right), (int) Math.floor(rect.bottom));