BitmapFactory

BitmapFactory.decodeResource(Resources res,int Id);//资源文件生成位图

Bitmap bmp = Bitmapfactory.decodeResource(this.getResources(),。drawable.icon);

draBitmap(Bitmap bitmap,float left,float top,Paint paint);

canvas.drawBitmap(bmp,0,0,paint);

canvas.rotate(float degrees,float px,float py);

canvas.save();

canvas.restore();

canvas.translate(float dx,float dy);

canvas.scale(float sx,float sy,float px,float py);

canvas.clipRect(int left,int top,int right,int bottom);//剪切区域

Region region = new Region();

region.op(new Rect(20,20,100,100),Region.Op.UNION);

canvas.clipRegion(region);//设置可视区域

Region.Op.UNION:区域全部显示

Region.Op.INTERSECT:区域的交集显示

Region.Op.XOR:不显示交集区域