SkiaSharpWeb.Blazor
0.6.2
dotnet add package SkiaSharpWeb.Blazor --version 0.6.2
NuGet\Install-Package SkiaSharpWeb.Blazor -Version 0.6.2
<PackageReference Include="SkiaSharpWeb.Blazor" Version="0.6.2" />
<PackageVersion Include="SkiaSharpWeb.Blazor" Version="0.6.2" />
<PackageReference Include="SkiaSharpWeb.Blazor" />
paket add SkiaSharpWeb.Blazor --version 0.6.2
#r "nuget: SkiaSharpWeb.Blazor, 0.6.2"
#:package SkiaSharpWeb.Blazor@0.6.2
#addin nuget:?package=SkiaSharpWeb.Blazor&version=0.6.2
#tool nuget:?package=SkiaSharpWeb.Blazor&version=0.6.2
SkiaSharpWeb.Blazor
Install SkiaSharpWeb.Blazor 0.6.2 for .NET 8/.NET 10. The real Skia JavaScript/WASM runtime is packaged as local static web assets, retaining native relative paths and dependency notices. Fonts are neither bundled nor implicitly downloaded.
Canvas and drawing
Use SkiaCanvas with a real CSS height. Backend accepts auto/canvas/webgl/webgpu; explicit Width/Height use native backing-store pixels. The engine handles resize and device-pixel ratio when dimensions are automatic. DrawCommands supports clear, rect, circle, line, oval, roundRect, save/restore, translate, scale, rotate and clipRect. Batches validate finite numeric values and balanced save scopes before drawing.
After Ready, call DrawAsync, InvalidateAsync, FlushAsync, GetInfoAsync, SnapshotAsync or ReadPixelAsync. Binary results are streamed, avoiding the Server message-size ceiling. GetSurfaceAsync/GetCanvasAsync expose borrowed native handles; SkiaProvider/SkiaModule expose the full initialized native namespace.
For text, paths, images, effects, documents and advanced GPU APIs, use a synchronous browser callback via Render = BrowserFunction.Module("./drawing.js", "paint") or native object methods through Module. A paint callback receives (native, canvas, info). Do not pass an asynchronous Server callback into the synchronous paint loop. Batch drawing avoids per-primitive network calls on Server.
The sample draws with native Skia, checks an exact red RGBA pixel, verifies a real PNG signature and tests unmount/remount. Full native compatibility boundaries remain in the project guide. This is a browser-engine wrapper, not an exhaustive generated C# SkiaSharp replacement.
See INTEGRATION.md for lifecycle, hosting, reference ownership, streaming and publishing.
Lifecycle in 0.6.2
SkiaCanvas.IsReady and IsDisposed expose visual lifecycle state. Concurrent cleanup awaits the native disposal fence, releases handles even after errors and retains cleanup failures. Late callbacks are suppressed after removal. Shared Razor roots now have awaitable teardown and safe late-import/creation cleanup; package-restored samples exercise template movement/update/recreation. Native Skia binaries, build prerequisites, asset paths and integrity checks are preserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.10)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.28)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.