SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.14k
stars
522
forks
source link
Canvas Info shows huge size when using Chrome Debugger and using Device Emulation #2834
Creating a simple app in Blazor that renders the clock-example works great, however, when I run device emulation (any device), it alters the size of the the Viewport, and when I attempt to calculate positioning, from e.Info.Size, it shows as a massive size.
When I first start the test app, without emulation, the width is 300 and the height is 150... but when press and go into developer tools, and try any of the built-in device emulators, the result is as per screen shot below with massive dimensions.
That same appears to be true when I attempt to view the same page on any mobile device. It seems to exhibit the same behavior.
Description
Creating a simple app in Blazor that renders the clock-example works great, however, when I run device emulation (any device), it alters the size of the the Viewport, and when I attempt to calculate positioning, from e.Info.Size, it shows as a massive size.
When I first start the test app, without emulation, the width is 300 and the height is 150... but when press and go into developer tools, and try any of the built-in device emulators, the result is as per screen shot below with massive dimensions.
That same appears to be true when I attempt to view the same page on any mobile device. It seems to exhibit the same behavior.
Code
The best way to share code for larger projects is a link to a GitHub repository: https://github.com/user/repo/tree/bug-123
But, you can also share a short block of code here:
You can also share some XAML:
Expected Behavior
No response
Actual Behavior
No response
Version of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
2.88.2 (Previous)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Windows
Platform / Operating System Version
No response
Devices
Andriod, Windows, IOS
Relevant Screenshots
No response
Relevant Log Output
No response
Code of Conduct