mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
move ImagePainter, and fix mobile drawImage quality
This commit is contained in:
@@ -17,6 +17,7 @@ import '../../common/widgets/remote_input.dart';
|
||||
import '../../models/input_model.dart';
|
||||
import '../../models/model.dart';
|
||||
import '../../models/platform_model.dart';
|
||||
import '../../utils/image.dart';
|
||||
import '../widgets/dialog.dart';
|
||||
import '../widgets/gestures.dart';
|
||||
|
||||
@@ -898,32 +899,6 @@ class CursorPaint extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class ImagePainter extends CustomPainter {
|
||||
ImagePainter({
|
||||
required this.image,
|
||||
required this.x,
|
||||
required this.y,
|
||||
required this.scale,
|
||||
});
|
||||
|
||||
ui.Image? image;
|
||||
double x;
|
||||
double y;
|
||||
double scale;
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
if (image == null) return;
|
||||
canvas.scale(scale, scale);
|
||||
canvas.drawImage(image!, Offset(x, y), Paint());
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(CustomPainter oldDelegate) {
|
||||
return oldDelegate != this;
|
||||
}
|
||||
}
|
||||
|
||||
void showOptions(
|
||||
BuildContext context, String id, OverlayDialogManager dialogManager) async {
|
||||
String quality =
|
||||
|
||||
Reference in New Issue
Block a user