Я пытаюсь добавить тень к моему растрового изображения, но я не могу понять, почему это не происходит:Невозможно удалить тень на растровом изображении с SetShadowLayer
public static Bitmap pimpMyBitmap(Bitmap bitmap) { // Scales down, adds rounded edges and shadow
Bitmap output = Bitmap.createBitmap(360, 240, Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
final RectF rectF = new RectF(0, 0, 360, 240);
final float roundPx = 12;
paint.setShadowLayer(5.5f, 6.0f, 6.0f, 0xFF000000);
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rectF, paint);
return output;
}