ShimSkiaSharp is a cloneable, inspectable command-model mirror of the SkiaSharp drawing primitives used by the repository. It is not a renderer. It is the data model that sits between SVG parsing and either runtime conversion or generated-code output.
dotnet add package ShimSkiaSharp
| Type | Role |
|---|---|
SKPictureRecorder |
Records command-model drawing operations |
SKPicture |
Stores CullRect and a list of CanvasCommand items |
SKCanvas |
Records commands such as DrawPath, DrawImage, Save, and Restore |
SKPath |
Stores geometric path commands |
SKPaint |
Stores fill, stroke, shader, filter, and typography state |
ShimSkiaSharp.Editing.* |
Clone-on-write and traversal helpers for model editing |
using System;
using ShimSkiaSharp;
var recorder = new SKPictureRecorder();
var canvas = recorder.BeginRecording(SKRect.Create(64, 64));
var path = new SKPath();
path.AddRect(SKRect.Create(8, 8, 48, 48));
var paint = new SKPaint
{
Style = SKPaintStyle.Fill
};
canvas.DrawPath(path, paint);
var picture = recorder.EndRecording();
foreach (var command in picture.Commands ?? Array.Empty<CanvasCommand>())
{
Console.WriteLine(command.GetType().Name);
}
This is the same family of types that Svg.Model, Svg.CodeGen.Skia, and parts of Svg.Skia exchange internally.
Live SkiaSharp objects are excellent for rendering, but they are not ideal when you need:
ShimSkiaSharp fills that gap.
The editing helpers under ShimSkiaSharp.Editing let you update paints, paths, and command graphs either in place or with clone-on-write behavior. That makes the package useful outside SVG scenarios as well.
ShimSkiaSharp pictures and drawables from SVG input.ShimSkiaSharp objects into live SkiaSharp objects for rendering.ShimSkiaSharp.SKPicture.ShimSkiaSharp