SkiaGameRendering.Brutal
0.23.0
dotnet add package SkiaGameRendering.Brutal --version 0.23.0
NuGet\Install-Package SkiaGameRendering.Brutal -Version 0.23.0
<PackageReference Include="SkiaGameRendering.Brutal" Version="0.23.0" />
<PackageVersion Include="SkiaGameRendering.Brutal" Version="0.23.0" />
<PackageReference Include="SkiaGameRendering.Brutal" />
paket add SkiaGameRendering.Brutal --version 0.23.0
#r "nuget: SkiaGameRendering.Brutal, 0.23.0"
#:package SkiaGameRendering.Brutal@0.23.0
#addin nuget:?package=SkiaGameRendering.Brutal&version=0.23.0
#tool nuget:?package=SkiaGameRendering.Brutal&version=0.23.0
Skia Game Rendering
Draw SkiaSharp vector art, text and SVG straight into MonoGame, KNI, FNA, raylib, Stride, Godot and Unity textures on the GPU, with no CPU readback.
Platform Support
Quick Start
Skia draws straight into whatever the engine is rendering to:
<img src="docs/images/scene.png" width="600" alt="A red circle, a blue SVG water drop and a pink-to-purple gradient rounded rectangle">
// once, e.g. in LoadContent
_skia = new SkiaDirectCanvas(GraphicsDevice);
_red = new SKPaint { Color = SKColors.Red, IsAntialias = true };
_drop = new SKSvg(); // Svg.Skia
_drop.Load("drop.svg");
_gradient = new SKPaint
{
IsAntialias = true,
Shader = SKShader.CreateLinearGradient(new SKPoint(420, 20), new SKPoint(580, 180),
new[] { new SKColor(0xF7, 0x25, 0x85), new SKColor(0x72, 0x09, 0xB7) }, SKShaderTileMode.Clamp),
};
// every frame, in Draw
_skia.Begin();
_skia.Canvas.DrawCircle(100, 100, 80, _red);
_skia.Canvas.DrawPicture(_drop.Picture, 220, 20);
_skia.Canvas.DrawRoundRect(new SKRect(420, 20, 580, 180), 32, 32, _gradient);
_skia.End();
Setup differs per engine; pick yours from the table above.
More
- API: SkiaRenderTarget2D, SkiaDirectCanvas
- Samples
- Performance tips and measurements
- Architecture and interop notes
- SkiaSharp drawing docs
License
MIT License. See LICENSE.md.
Credits
Originally created by Miguel Anxo Figueirido.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- SkiaGameRendering.Core.VK (>= 0.23.0)
- SkiaSharp (= 4.153.1)
- SkiaSharp.NativeAssets.Linux (= 4.153.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SkiaGameRendering.Brutal:
| Package | Downloads |
|---|---|
|
Gum.Brutal.Vulkan
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.