mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-25 20:57:41 +00:00
Utilize left margin in drawing mask.
This commit is contained in:
@@ -88,7 +88,9 @@ public class MaskView extends View {
|
|||||||
target.draw(maskCanvas);
|
target.draw(maskCanvas);
|
||||||
|
|
||||||
canvas.clipRect(drawingRect.left, Math.max(drawingRect.top, getTop() + getPaddingTop()), drawingRect.right, Math.min(drawingRect.bottom, getBottom() - getPaddingBottom()));
|
canvas.clipRect(drawingRect.left, Math.max(drawingRect.top, getTop() + getPaddingTop()), drawingRect.right, Math.min(drawingRect.bottom, getBottom() - getPaddingBottom()));
|
||||||
canvas.drawBitmap(mask, 0, drawingRect.top, maskPaint);
|
|
||||||
|
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) target.getLayoutParams();
|
||||||
|
canvas.drawBitmap(mask, params.leftMargin, drawingRect.top, maskPaint);
|
||||||
|
|
||||||
mask.recycle();
|
mask.recycle();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user