在Android中2D中实现对图片的倒影(二)

2014-11-24 03:24:58 · 作者: · 浏览: 7
matrix.setValues(f);
Bitmap bitmap = Bitmap.createBitmap(src, 0, 0,width, height, matrix, false);


height = (int) (height*percent);
int[] pixels = new int[width*height];
bitmap.getPixels(pixels, 0, width, 0, 0, width, height);
shadowFromPixels(pixels, width, height, alphastart);

bitmap =Bitmap.createBitmap(pixels, width, height, Config.ARGB_8888);
return bitmap;
}

}