fixed transparent image hero artifact
This commit is contained in:
parent
b19d01879f
commit
f1aefb2bb1
1 changed files with 2 additions and 1 deletions
|
@ -190,7 +190,8 @@ class _TransitionImagePainter extends CustomPainter {
|
||||||
Offset.zero & inputSize,
|
Offset.zero & inputSize,
|
||||||
);
|
);
|
||||||
if (background != null) {
|
if (background != null) {
|
||||||
canvas.drawRect(destinationRect, Paint()..color = background!);
|
// deflate to avoid background artifact around opaque image
|
||||||
|
canvas.drawRect(destinationRect.deflate(1), Paint()..color = background!);
|
||||||
}
|
}
|
||||||
canvas.drawImageRect(image!, sourceRect, destinationRect, paint);
|
canvas.drawImageRect(image!, sourceRect, destinationRect, paint);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue