Hello Lluis! I've tried to draw GDI image on XWT context (wpf backend actually), but on 125% UI setting it became corrupted. I've already gathered scaling factor from Screen.ScaleFactor and used it to increase physical size of generated bitmap. After messing around with stuff I found this code is the reason (in Xwt.WPF, ImageHandler.cs method WPFImage.Draw):
if (bmpImage != null && (bmpImage.PixelHeight != idesc.Size.Height || bmpImage.PixelWidth != idesc.Size.Width))
f = new TransformedBitmap (bmpImage, new ScaleTransform (idesc.Size.Width / bmpImage.PixelWidth, idesc.Size.Height / bmpImage.PixelHeight));
If high DPI setting, idesc.Size will be obviously less size and we don't need to rescale image. Please clarify if I miss some in API to prevent image blurring without erasing this code.
Hello Lluis! I've tried to draw GDI image on XWT context (wpf backend actually), but on 125% UI setting it became corrupted. I've already gathered scaling factor from Screen.ScaleFactor and used it to increase physical size of generated bitmap. After messing around with stuff I found this code is the reason (in Xwt.WPF, ImageHandler.cs method WPFImage.Draw):
If high DPI setting, idesc.Size will be obviously less size and we don't need to rescale image. Please clarify if I miss some in API to prevent image blurring without erasing this code.