fix, set texture widget offset to int on linux
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
7e5b81ff4d
commit
cb1a06270e
@ -576,11 +576,13 @@ class _ImagePaintState extends State<ImagePaint> {
|
|||||||
late final Widget imageWidget;
|
late final Widget imageWidget;
|
||||||
if (c.size.width > 0 && c.size.height > 0) {
|
if (c.size.width > 0 && c.size.height > 0) {
|
||||||
if (widget.useTextureRender) {
|
if (widget.useTextureRender) {
|
||||||
|
final x = Platform.isLinux ? c.x.toInt().toDouble() : c.x;
|
||||||
|
final y = Platform.isLinux ? c.y.toInt().toDouble() : c.y;
|
||||||
imageWidget = Stack(
|
imageWidget = Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(
|
Positioned(
|
||||||
left: c.x,
|
left: x,
|
||||||
top: c.y,
|
top: y,
|
||||||
width: c.getDisplayWidth() * s,
|
width: c.getDisplayWidth() * s,
|
||||||
height: c.getDisplayHeight() * s,
|
height: c.getDisplayHeight() * s,
|
||||||
child: Texture(
|
child: Texture(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user