English | Site Directory

Android - An Open Handset Alliance Project

android.graphics.drawable.shapes
public abstract class

android.graphics.drawable.shapes.Shape

java.lang.Object
android.graphics.drawable.shapes.Shape
Known Direct Subclasses
Known Indirect Subclasses

Summary

Public Constructors

          Shape()

Public Methods

abstract        void  draw(Canvas canvas, Paint paint)
Draw this shape (sized by a previous call to resize()) into the provided canvas and paint.
        boolean  hasAlpha()
abstract        void  resize(int width, int height)
Resize this shape (as the subclass sees fit) based on the provided width and height.
Methods inherited from class java.lang.Object

Details

Public Constructors

public Shape()

Public Methods

public abstract void draw(Canvas canvas, Paint paint)

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

public boolean hasAlpha()

Returns

  • true if any part of the drawable is not opaque. Default impl returns true. Override if your subclass can be opaque.

public abstract void resize(int width, int height)

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