Rescaling pictures from SVG file #189
Replies: 4 comments
-
You want something like Svg control from Avalonia ported. WPF is not supported. |
Beta Was this translation helpful? Give feedback.
-
Thank you, you are the developer, you are the expert. I should have been more clear, for those not familiar with WPF. This is a .Net application using C#. I am using Svg.Skia to load SVG files and SkiaSharp to draw it. Therefore I think that WPF is irrelevant to my use of Svg.Skia. If Svg.Skia will not work then I must accept that but I want to ensure that the requirements are understood. I have heard of Avalonia and I have considered trying it. For this project, if .Net MAUI will satisfy requirements then that is the alternative. |
Beta Was this translation helpful? Give feedback.
-
I have learned that probably I just need to change the width and height in the XML to get a new size. And probably viewBox, I am a beginner. Modifications such as that are of course very common, I just need to figure out how to do that. |
Beta Was this translation helpful? Give feedback.
-
The answer is to use a
Then instead of That works in WPF. |
Beta Was this translation helpful? Give feedback.
-
I have a WPF application that uses SkiaSharp and Svg.Skia. I can load SVG files and show the picture in an XAML skia:SKElement. I cannot find a way to rescale (resize) the images without converting to some other format, such as a bitmap. How do I do that? Is there documentation describing how to do that?
In other words, I want to show an image at a different size, but the entire image, not cropped. It is my understanding that that is a fundamental feature of SVG.
Beta Was this translation helpful? Give feedback.
All reactions