public staticBitmapcreateReflectedImage(Bitmap sourceBitmap) {
//背景虚化
LinearGradient gradient =newLinearGradient(0.0F,0.0F,0.0F,
sourceBitmap.getHeight(),0x70ffffff,0x00ffffff,Shader.TileMode.MIRROR);
//画笔
Paint paint =newPaint();
paint.setShader(gradient);
paint.setXfermode(newPorterDuffXfermode(PorterDuff.Mode.DST_IN));
//矩阵
Matrix matrix =newMatrix();
matrix.setScale(1.0F,-1.0F);
BitmapinverseBitmap= Bitmap.createBitmap(sourceBitmap,0,0,sourceBitmap.getWidth(),sourceBitmap.getHeight(),matrix,
true);
Bitmap destBitmap = Bitmap.createBitmap(sourceBitmap.getWidth(),sourceBitmap.getHeight(),Bitmap.Config.ARGB_8888);
Canvas canvas =newCanvas(destBitmap);
canvas.drawBitmap(inverseBitmap,0.0F,0.0F, null);
canvas.drawRect(0.0F,0.0F,sourceBitmap.getWidth(),sourceBitmap.getWidth(),paint);
if(!inverseBitmap.isRecycled())
inverseBitmap.recycle();
System.gc();
returndestBitmap;
}