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 trying to open an SVG and now when I call svgLoad(stream) below I am getting the following error:
System.MissingMethodException: Method not found: SkiaSharp.SKMatrix SkiaSharp.SKMatrix.MakeTranslation(single,single)
at SkiaSharp.Extended.Svg.SKSvg.LoadElements(IEnumerable`1 elements, SKCanvas canvas, SKPaint stroke, SKPaint fill)
at SkiaSharp.Extended.Svg.SKSvg.Load(XDocument xdoc)
at SkiaSharp.Extended.Svg.SKSvg.Load(XmlReader reader)
at SkiaSharp.Extended.Svg.SKSvg.Load(Stream stream)
at Myproject.Views.MyView.CanvasView_PaintSurface
I am not sure what I am doing wrong or how to fix this. I have spent hours looking on google and cannot find the correct answer. I had updated to the latest nugets but thats when the problems started. So I downgraded and I am still having issues. I am hoping someone can point me on the right direction or explain what I need to do
Below are the nugets I am using and my current code
` SKSvg? svg = new();
using (Stream? stream = GetType().Assembly.GetManifestResourceStream(resourceId))
{
if (stream != null)
{
try
{
svg.Load(stream);
}
catch (Exception ex)
{
var message = ex;
}
ReticleLayoutUtility.DrawLayout(info, _canvas, svg, _vm);
_vm.UpdateProperties();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I upgraded to .net 9 MAUI.
Then I updated the nugets based on this information: https://learn.microsoft.com/en-us/dotnet/maui/migration/skiasharp?view=net-maui-9.0
I am trying to open an SVG and now when I call svgLoad(stream) below I am getting the following error:
System.MissingMethodException: Method not found: SkiaSharp.SKMatrix SkiaSharp.SKMatrix.MakeTranslation(single,single)
at SkiaSharp.Extended.Svg.SKSvg.LoadElements(IEnumerable`1 elements, SKCanvas canvas, SKPaint stroke, SKPaint fill)
at SkiaSharp.Extended.Svg.SKSvg.Load(XDocument xdoc)
at SkiaSharp.Extended.Svg.SKSvg.Load(XmlReader reader)
at SkiaSharp.Extended.Svg.SKSvg.Load(Stream stream)
at Myproject.Views.MyView.CanvasView_PaintSurface
I am not sure what I am doing wrong or how to fix this. I have spent hours looking on google and cannot find the correct answer. I had updated to the latest nugets but thats when the problems started. So I downgraded and I am still having issues. I am hoping someone can point me on the right direction or explain what I need to do
Below are the nugets I am using and my current code
` SKSvg? svg = new();
using (Stream? stream = GetType().Assembly.GetManifestResourceStream(resourceId))
{
if (stream != null)
{
try
{
svg.Load(stream);
}
catch (Exception ex)
{
}
}`
Beta Was this translation helpful? Give feedback.
All reactions