Wiesław Šoltés

Results 243 comments of Wiesław Šoltés

> @wieslawsoltes do you think you could achieve the full rendering functionality of vvvv/Svg with your Svg.Skia implementation? I think we can, a lot of rendering functionality already there.

@tebjan @mrbean-bremen So my current approach in `Svg.Skia` for rendering using `SkiaSharp` and document processing from `Svg` library is: ### Step 1 - load document ```C# var svgDocument = SvgDocument.Open(path,...

I might add that I have some experience with abstracting rendering interfaces in my other projects: One example is my `Core2D` drawing application: https://github.com/wieslawsoltes/Core2D/blob/86dc381798f5fbd03fb24fe0bc1e9f687f45ef80/src/Core2D.Model/Renderer/IShapeRenderer.cs#L12 and the custom renderers implementations: https://github.com/wieslawsoltes/Core2D/blob/86dc381798f5fbd03fb24fe0bc1e9f687f45ef80/src/Core2D.Renderer.Avalonia/AvaloniaRenderer.cs#L24...

Also for reference regarding usage of `SkiaSharp`, I have created recently pretty advanced drawing application based on `SkiaSharp`. Much of inspiration and design of `Svg.Skia` is based on this project...

Here is current `Svg.Skia` implementation with above mentioned interface: ### Rendering interface `ISvgRenderer` https://github.com/wieslawsoltes/Svg.Skia/blob/334b3f8bbc29136057e7a808ab8cb4becd59c6f5/src/Svg.Skia/Core/ISvgRenderer.cs#L8 ### SkiaSharp Rendering interface implementation https://github.com/wieslawsoltes/Svg.Skia/blob/334b3f8bbc29136057e7a808ab8cb4becd59c6f5/src/Svg.Skia/SKSvgRenderer.cs#L12 ### Utilities for SkiaSharp https://github.com/wieslawsoltes/Svg.Skia/blob/334b3f8bbc29136057e7a808ab8cb4becd59c6f5/src/Svg.Skia/Skia/SkiaUtil.cs#L16 The `SkiaUtil` class is most...

> > You can see in all cases I am passing drawing context `object canvas` as `object`. > > In each the `draw` method I am casting drawing context `canvas`...

> not sure if the canvas object is necessary, why not simply? or am i missing something? > > ```cs > public class SvgCircle > { > // ... >...

The `canvas` in `SkiaSharp` is short-lived, but renderer can persist longer.

usually you have some `drawing context` that is used for drawing like `SKCanvas` in `SkiaSharp` and ` Graphics` in `System.Drawing` that's why I like to pass `object canvas` as parameter...

@tebjan ok I will update my proposal shortly, just need to test 😄