OpenMacroBoard.SDK.KeyBitmap.SkiaSharp 11.0.0-beta.1

This is a prerelease version of OpenMacroBoard.SDK.KeyBitmap.SkiaSharp.
dotnet add package OpenMacroBoard.SDK.KeyBitmap.SkiaSharp --version 11.0.0-beta.1
                    
NuGet\Install-Package OpenMacroBoard.SDK.KeyBitmap.SkiaSharp -Version 11.0.0-beta.1
                    
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="OpenMacroBoard.SDK.KeyBitmap.SkiaSharp" Version="11.0.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenMacroBoard.SDK.KeyBitmap.SkiaSharp" Version="11.0.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="OpenMacroBoard.SDK.KeyBitmap.SkiaSharp" />
                    
Project file
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 OpenMacroBoard.SDK.KeyBitmap.SkiaSharp --version 11.0.0-beta.1
                    
#r "nuget: OpenMacroBoard.SDK.KeyBitmap.SkiaSharp, 11.0.0-beta.1"
                    
#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 OpenMacroBoard.SDK.KeyBitmap.SkiaSharp@11.0.0-beta.1
                    
#: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=OpenMacroBoard.SDK.KeyBitmap.SkiaSharp&version=11.0.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OpenMacroBoard.SDK.KeyBitmap.SkiaSharp&version=11.0.0-beta.1&prerelease
                    
Install as a Cake Tool

OpenMacroBoard.SDK.KeyBitmap.SkiaSharp

Draw the images for the keys of a macro board with SkiaSharp: text, lines, shapes, everything an SKCanvas offers. This package adds two methods to KeyBitmap.Create of OpenMacroBoard.SDK.

It works on Windows, Linux and macOS.

Draw on a key

FromSkiaCanvas gives you a canvas of the size you ask for and turns what you drew into a KeyBitmap. The canvas starts black.

using OpenMacroBoard.SDK;
using SkiaSharp;

using var font = new SKFont(SKTypeface.Default, 24);
using var paint = new SKPaint { Color = SKColors.White, IsAntialias = true };

var key = KeyBitmap.Create.FromSkiaCanvas(72, 72, canvas =>
{
    canvas.Clear(SKColors.DarkBlue);
    canvas.DrawText("Hi!", 14, 44, SKTextAlign.Left, font, paint);
});

board.SetKeyBitmap(0, key);

Use an existing bitmap

FromSkiaBitmap converts an SKBitmap you already have, in any color type. Transparent parts become black.

using var bitmap = SKBitmap.Decode("icon.webp");
var key = KeyBitmap.Create.FromSkiaBitmap(bitmap);

Linux

SkiaSharp needs a native library. For Windows and macOS it comes with SkiaSharp itself. On Linux, add one of these packages to your application:

  • SkiaSharp.NativeAssets.Linux.NoDependencies: needs no other library from the system. This is the simple choice, and what the examples in the repository use.
  • SkiaSharp.NativeAssets.Linux: finds fonts through the library libfontconfig, which has to be installed on the system. Without it SkiaSharp does not start at all.

Both find the fonts that are installed on the system. A system without any font (many containers) draws no text; install a font package, or load a font file with SKTypeface.FromFile.

Do you need this package?

Not for loading image files. The SDK reads BMP, PNG and JPEG files itself:

var key = KeyBitmap.Create.FromFile("icon.png");

You need it when you want to draw at run time, for example text. On Windows only, OpenMacroBoard.SDK.KeyBitmap.GDI does the same with System.Drawing.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.0-beta.1 60 11/21/2026