SkiaGameRendering.Android
0.23.0
dotnet add package SkiaGameRendering.Android --version 0.23.0
NuGet\Install-Package SkiaGameRendering.Android -Version 0.23.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SkiaGameRendering.Android" Version="0.23.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SkiaGameRendering.Android" Version="0.23.0" />
<PackageReference Include="SkiaGameRendering.Android" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SkiaGameRendering.Android --version 0.23.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SkiaGameRendering.Android, 0.23.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SkiaGameRendering.Android@0.23.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SkiaGameRendering.Android&version=0.23.0
#tool nuget:?package=SkiaGameRendering.Android&version=0.23.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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-android36.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0-android36.0
- MonoGame.Framework.Android (>= 3.8.4.1)
- SkiaGameRendering.Core.OGL (>= 0.23.0)
- SkiaSharp (= 4.153.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.