unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.98k stars 730 forks source link

SVG rendering issues: iOS #18520

Open baskren opened 3 weeks ago

baskren commented 3 weeks ago

Current behavior

SVG rendering defects, by platform:

iOS (Rider 2024.3 EAP 3, M2 MBP):

image

Expected behavior

SVG images should render as they do on other platforms (see test images, below):

Platform test images: net8.0-windows10.0.19041 ( [after regressing to WindowsAppSDK 1.5](https://github.com/mono/SkiaSharp/issues/2999#issuecomment-2408614781) ): image WASM (vs2022, windows, edge): image Desktop (Windows - vs2022): image Android (Rider 2024.3 EAP 3, M2 MBP): image MacCatalyst (MacOS - Rider 2024.3 EAP 3, M2 MBP): image

How to reproduce it (as minimally and precisely as possible)

Demo repo: https://github.com/baskren/UnoSvgDefects

Workaround

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

Uno.Sdk : 5.4.10 Svg.Skia : 1.0.0.9 SkiaSharp.Svg : 1.60.0

Affected platforms

iOS

IDE

Rider macOS

IDE version

2024.3 EAP 3

Relevant plugins

No response

Anything else we need to know?

No response

jeromelaban commented 1 week ago

Note for contributors

SVG rendering is done though the Svg.Skia library, used by Resizetizer, and it's likely that the issue is in this library.

MartinZikmund commented 1 week ago

iOS rendering issue addressed by using Svg.Skia in a SKXamlCanvas (as shown in demo app).

@jeromelaban seems that when Svg.Skia is used directly, the artifacts are not present, which is confusing