diff --git a/android/src/main/java/com/horcrux/svg/FeOffsetView.java b/android/src/main/java/com/horcrux/svg/FeOffsetView.java index 8dac0a37b..5e01b3859 100644 --- a/android/src/main/java/com/horcrux/svg/FeOffsetView.java +++ b/android/src/main/java/com/horcrux/svg/FeOffsetView.java @@ -44,8 +44,10 @@ public Bitmap applyFilter(HashMap resultsMap, Bitmap prevResult) float dy = this.mDy != null ? (float) this.relativeOnHeight(this.mDy) : 0; RectF frame = new RectF(0, 0, dx, dy); this.getSvgView().getCtm().mapRect(frame); + dx = frame.left < 0 ? frame.left : frame.width(); + dy = frame.top < 0 ? frame.top : frame.height(); - canvas.drawBitmap(source, frame.width(), frame.height(), null); + canvas.drawBitmap(source, dx, dy, null); return result; }