English | Site Directory

Android - An Open Handset Alliance Project

android.graphics.drawable.shapes.RoundRectShape

java.lang.Object
android.graphics.drawable.shapes.Shape
android.graphics.drawable.shapes.RectShape
android.graphics.drawable.shapes.RoundRectShape

Summary

Public Constructors

          RoundRectShape(float[] outerRadii, RectF inset, float[] innerRadii)
Specifies an outer (round)rect and an optional inner (round)rect.

Public Methods

        void  draw(Canvas canvas, Paint paint)
Draw this shape (sized by a previous call to resize()) into the provided canvas and paint.
        void  resize(int w, int h)
Resize this shape (as the subclass sees fit) based on the provided width and height.
Methods inherited from class android.graphics.drawable.shapes.RectShape
Methods inherited from class android.graphics.drawable.shapes.Shape
Methods inherited from class java.lang.Object

Details

Public Constructors

public RoundRectShape(float[] outerRadii, RectF inset, float[] innerRadii)

Specifies an outer (round)rect and an optional inner (round)rect.

Parameters

outerRadii For an outer roundrect, this is an array of 8 radius values. For an outer rect, pass null.
inset For an inner (round)rect, specifies the amounts to add to each side of the outer rect. For no inner (round)rect pass null.
innerRadii If inset is null, this parameter is ignored. For a valid inset, a non-null array specifies the 8 radii for the inner roundrect. If the array is null, then the inner rect is just a rect.

Public Methods

public void draw(Canvas canvas, Paint paint)

Draw this shape (sized by a previous call to resize()) into the provided canvas and paint.

public void resize(int w, int h)

Resize this shape (as the subclass sees fit) based on the provided width and height.
Build m5-rc15i - 10 Jun 2008 13:54