Skip to content

Commit 0ed7fbe

Browse files
committed
Update
1 parent b22943b commit 0ed7fbe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/src/main/java/com/omarea/common/ui/BlurEngine.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ public Bitmap getUpdatedBlurBitmap() {
7272
cachedCanvas.drawColor(0, PorterDuff.Mode.CLEAR);
7373

7474
if (!blurBitmap.isRecycled()) {
75-
cachedCanvas.drawBitmap(blurBitmap, srcRect, new Rect(0, 0, w, h), null);
75+
int dstLeft = x < 0 ? -x : 0;
76+
int dstTop = y < 0 ? -y : 0;
77+
Rect dstRect = new Rect(dstLeft, dstTop, dstLeft + srcRect.width(), dstTop + srcRect.height());
78+
79+
cachedCanvas.drawBitmap(blurBitmap, srcRect, dstRect, null);
7680
cachedCanvas.drawColor(getBlurTintColor());
7781
return cachedBitmap;
7882
}

0 commit comments

Comments
 (0)