You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am passing a string to an Svg Control but the specific CSS property doesn't seem be applied. The same Svg but passed through path is applied without issues.
I've went a bit deeper into it and noticed that the FromSvg(string svg) lacks a svgOptions which affects how this is loaded.
/// <summary>/// Attempts to create an SVG document from the specified string data./// </summary>/// <param name="svg">The SVG data.</param>publicstatic T FromSvg<T>(stringsvg)whereT:SvgDocument,new(){if(string.IsNullOrEmpty(svg)){thrownew ArgumentNullException("svg");}using(varstrReader=new StringReader(svg)){varreader=new SvgTextReader(strReader,null){XmlResolver=new SvgDtdResolver(),WhitespaceHandling= WhitespaceHandling.Significant,DtdProcessing=DisableDtdProcessing? DtdProcessing.Ignore : DtdProcessing.Parse,};returnCreate<T>(reader);}}
Adding the Svg Options and going up the tree along with it could allow for a fix for this. I could make a PR if this is a wanted feature
MassKlaus
changed the title
Avalonia Skia Controls. Css does not apply when using Source rather than Path.
Avalonia Svg Skia . Css does not apply when using Source rather than Path.
Sep 10, 2024
I am passing a string to an Svg Control but the specific CSS property doesn't seem be applied. The same Svg but passed through path is applied without issues.
Is this a feature not supported by the library?
The svg in question in case the issue is with it. This is a test for now, The final result is meant to be a much larger taking multiple musical notes.
I am using Avalonia.Svg.Skia 11.1.0.1
If I missed any information let me know!
The text was updated successfully, but these errors were encountered: