FileDocCategorySizeDatePackage
Patterns.javaAPI DocAndroid 1.5 API4177Wed May 06 22:41:08 BST 2009com.example.android.apis.graphics

Patterns

public class Patterns extends GraphicsActivity

Fields Summary
Constructors Summary
Methods Summary
private static BitmapmakeBitmap1()

        Bitmap bm = Bitmap.createBitmap(40, 40, Bitmap.Config.RGB_565);
        Canvas c = new Canvas(bm);
        c.drawColor(Color.RED);
        Paint p = new Paint();
        p.setColor(Color.BLUE);
        c.drawRect(5, 5, 35, 35, p);
        return bm;
    
private static BitmapmakeBitmap2()

        Bitmap bm = Bitmap.createBitmap(64, 64, Bitmap.Config.ARGB_8888);
        Canvas c = new Canvas(bm);
        Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
        p.setColor(Color.GREEN);
        p.setAlpha(0xCC);
        c.drawCircle(32, 32, 27, p);
        return bm;
    
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        setContentView(new SampleView(this));