Resizing window leads to corrupted rendering when using svgResource
The following code
Column(horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.fillMaxWidth()) {
Image(
painter = svgResource("images/Kotlin-logo.svg"),
contentDescription = "Logo",
modifier = Modifier.fillMaxWidth().padding(5.dp),
)
}
leads to corrupted rendering when resizing (shrinking) the window as can be seen in this picture
I am attaching the svg file used
Please note that if you remove the width/height parameters then the problem goes away
// rendering issue
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px" viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;"
width="512" height="512" xml:space="preserve">
// no rendering issue
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px" viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;"
xml:space="preserve">
Thanks for the report!
The corrupted rendering happens on macOs, but don't happen on WIndows.
Probably it is a bug in Skia. We will make a reproducer in pure Skia and fill an issue in Skia issue tracker.
@igordmn is Skia issue number known?
is Skia issue number known?
No, I didn't find existing issue. We need to create a new one with a reproducer.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.