RectShape.javaAPI DocAndroid 5.1 API1983Thu Mar 12 22:22:30 GMT


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

Fields Summary
Constructors Summary
public RectShape()

Methods Summary

        final RectShape shape = (RectShape) super.clone();
        shape.mRect = new RectF(mRect);
        return shape;
public voiddraw( canvas, paint)

        canvas.drawRect(mRect, paint);
public voidgetOutline( outline)

        final RectF rect = rect();
        outline.setRect((int) Math.ceil(rect.left), (int) Math.ceil(,
                (int) Math.floor(rect.right), (int) Math.floor(rect.bottom));
protected voidonResize(float width, float height)

        mRect.set(0, 0, width, height);
protected final
Returns the RectF that defines this rectangle's bounds.

        return mRect;