Sabtu, 04 Desember 2010

Bitmapを水平に並べて描画

// Viewを継承した無名クラスの定義・生成 
View child = new View(this) {
        @Override
        public void onDraw(Canvas canvas) {
                super.onDraw(canvas);
                Bitmap icon1 = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
                Bitmap icon2 = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
                Paint background = new Paint();
                background.setAlpha(255);
                canvas.drawBitmap(icon1, 0, 0, background);
                canvas.drawBitmap(icon2, icon1.getWidth(), 0, background);
                canvas.drawColor(Color.TRANSPARENT);
        }
}

Tidak ada komentar:

Posting Komentar

 
Copyright 2010 hot news. All rights reserved.
Themes by Ex Templates Blogger Templates l Home Recordings l Studio Rekaman Sitemap New gadget news Luxury Car Review Celebrity News Head Line News News Trends Concept cars Gambar Mesin Circuit Electronic Celebrity News Trends MotoGP News Trends Ghost Mistery Honda Modify Ghost photo Collection Credit Card Mstered Flower Colelction Photo Hybrid Auto News Modification Auto Indonesian News Trends Day News Trends Automotive News Trends vex robotic kit Hot News Trends