Open
Description
openedon Mar 2, 2023
Description
Under Android, canvas. DrawImage is not displayed completely, and iOS is normal
The size of the image is equal to the canvas area multiplied by the device density.
`
float density_ = (float)DeviceDisplay.Current.MainDisplayInfo.Density;
if (density_ > 1)
{
graphics_view_.WidthRequest = image.Width / density_;
graphics_view_.HeightRequest = image.Height / density_;
graphics_view_.Invalidate();
}
IImage image = PlatformImage.FromStream(mem_stream);
canvas.DrawImage(image, 0, 0, dirtyRect.Width, dirtyRect.Height);
`
Steps to Reproduce
As shown in https://github.com/gudder/repository/tree/main/MauiAppAndroidDrawImage
Link to public reproduction project repository
https://github.com/gudder/repository/tree/main/MauiAppAndroidDrawImage
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12(API 31)
Did you find any workaround?
No response
Relevant log output
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment