FileDocCategorySizeDatePackage
RectShape.javaAPI DocAndroid 1.5 API1745Wed May 06 22:42:00 BST 2009android.graphics.drawable.shapes

RectShape

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 android.graphics.drawable.ShapeDrawable}.

Fields Summary
private android.graphics.RectF
mRect
Constructors Summary
public RectShape()
RectShape constructor.

    
           
      
Methods Summary
public android.graphics.drawable.shapes.RectShapeclone()

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

        canvas.drawRect(mRect, paint);
    
protected voidonResize(float width, float height)

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

        return mRect;