Merge "Enable to recreate icon with shadow without resizing it." into ub-launcher3-dorval-polish
am: 89c719e8a3
Change-Id: Ia6e4232d1e49bd9479486321c827245e92bfd95d
This commit is contained in:
commit
b051e7fc64
|
@ -63,9 +63,15 @@ public class ShadowGenerator {
|
|||
}
|
||||
|
||||
public synchronized Bitmap recreateIcon(Bitmap icon) {
|
||||
return recreateIcon(icon, true);
|
||||
}
|
||||
|
||||
public synchronized Bitmap recreateIcon(Bitmap icon, boolean resize) {
|
||||
int width = resize ? mIconSize : icon.getWidth();
|
||||
int height = resize ? mIconSize : icon.getHeight();
|
||||
int[] offset = new int[2];
|
||||
Bitmap shadow = icon.extractAlpha(mBlurPaint, offset);
|
||||
Bitmap result = Bitmap.createBitmap(mIconSize, mIconSize, Config.ARGB_8888);
|
||||
Bitmap result = Bitmap.createBitmap(width, height, Config.ARGB_8888);
|
||||
mCanvas.setBitmap(result);
|
||||
|
||||
// Draw ambient shadow
|
||||
|
|
Loading…
Reference in New Issue