Merge pull request #5754 from dignow/fix/scale_adaptive_blurry
fix, scale adaptive blurry
This commit is contained in:
commit
cdc92fc552
@ -485,21 +485,20 @@ class _ImagePaintState extends State<ImagePaint> {
|
|||||||
var c = Provider.of<CanvasModel>(context);
|
var c = Provider.of<CanvasModel>(context);
|
||||||
final s = c.scale;
|
final s = c.scale;
|
||||||
|
|
||||||
|
bool isViewAdaptive() => c.viewStyle.style == kRemoteViewStyleAdaptive;
|
||||||
|
bool isViewOriginal() => c.viewStyle.style == kRemoteViewStyleOriginal;
|
||||||
|
|
||||||
mouseRegion({child}) => Obx(() {
|
mouseRegion({child}) => Obx(() {
|
||||||
double getCursorScale() {
|
double getCursorScale() {
|
||||||
var c = Provider.of<CanvasModel>(context);
|
var c = Provider.of<CanvasModel>(context);
|
||||||
var cursorScale = 1.0;
|
var cursorScale = 1.0;
|
||||||
if (Platform.isWindows) {
|
if (Platform.isWindows) {
|
||||||
// debug win10
|
// debug win10
|
||||||
final isViewAdaptive =
|
if (zoomCursor.value && isViewAdaptive()) {
|
||||||
c.viewStyle.style == kRemoteViewStyleAdaptive;
|
|
||||||
if (zoomCursor.value && isViewAdaptive) {
|
|
||||||
cursorScale = s * c.devicePixelRatio;
|
cursorScale = s * c.devicePixelRatio;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final isViewOriginal =
|
if (zoomCursor.value || isViewOriginal()) {
|
||||||
c.viewStyle.style == kRemoteViewStyleOriginal;
|
|
||||||
if (zoomCursor.value || isViewOriginal) {
|
|
||||||
cursorScale = s;
|
cursorScale = s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -541,7 +540,8 @@ class _ImagePaintState extends State<ImagePaint> {
|
|||||||
height: imageHeight,
|
height: imageHeight,
|
||||||
child: Obx(() => Texture(
|
child: Obx(() => Texture(
|
||||||
textureId: widget.textureId.value,
|
textureId: widget.textureId.value,
|
||||||
filterQuality: FilterQuality.none,
|
filterQuality:
|
||||||
|
isViewOriginal() ? FilterQuality.none : FilterQuality.low,
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -587,7 +587,8 @@ class _ImagePaintState extends State<ImagePaint> {
|
|||||||
height: c.getDisplayHeight() * s,
|
height: c.getDisplayHeight() * s,
|
||||||
child: Texture(
|
child: Texture(
|
||||||
textureId: widget.textureId.value,
|
textureId: widget.textureId.value,
|
||||||
filterQuality: FilterQuality.none,
|
filterQuality:
|
||||||
|
isViewOriginal() ? FilterQuality.none : FilterQuality.low,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user