PixlPunkt.PluginSdk 1.0.2

dotnet add package PixlPunkt.PluginSdk --version 1.0.2
                    
NuGet\Install-Package PixlPunkt.PluginSdk -Version 1.0.2
                    
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="PixlPunkt.PluginSdk" Version="1.0.2">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PixlPunkt.PluginSdk" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="PixlPunkt.PluginSdk">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 PixlPunkt.PluginSdk --version 1.0.2
                    
#r "nuget: PixlPunkt.PluginSdk, 1.0.2"
                    
#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 PixlPunkt.PluginSdk@1.0.2
                    
#: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=PixlPunkt.PluginSdk&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=PixlPunkt.PluginSdk&version=1.0.2
                    
Install as a Cake Tool

PixlPunkt Plugin SDK

NuGet License: MIT

The official SDK for developing plugins for PixlPunkt, a modern pixel art editor for Windows.

Features

  • Custom Tools - Create new drawing tools with full brush and stroke support
  • Custom Effects - Add image processing effects and filters
  • Import/Export Handlers - Support new file formats for images and palettes
  • Keyboard Shortcuts - Define shortcuts for your tools
  • Tool Options UI - Declarative UI for tool settings (sliders, toggles, dropdowns, etc.)

Installation

dotnet add package PixlPunkt.PluginSdk

Or via the NuGet Package Manager:

Install-Package PixlPunkt.PluginSdk

Quick Start

1. Create a new Class Library project

dotnet new classlib -n MyPixlPunktPlugin
cd MyPixlPunktPlugin
dotnet add package PixlPunkt.PluginSdk

2. Enable plugin packaging

Add these properties to your .csproj:

<PropertyGroup>
  <PackAsPlugin>true</PackAsPlugin>
  <PluginId>com.yourname.myplugin</PluginId>
  <PluginDisplayName>My Awesome Plugin</PluginDisplayName>
  <PluginAuthor>Your Name</PluginAuthor>
  <PluginDescription>Does awesome things!</PluginDescription>
</PropertyGroup>

3. Create your plugin class

using PixlPunkt.PluginSdk;

namespace MyPixlPunktPlugin;

public class MyPlugin : PixlPunktPlugin
{
    public override string Id => "com.yourname.myplugin";
    public override string Name => "My Awesome Plugin";
    public override string Author => "Your Name";
    public override Version Version => new(1, 0, 0);
    
    public override void Initialize(IPluginHost host)
    {
        // Register your tools, effects, importers, etc.
        host.RegisterTool(new MyCustomTool());
    }
}

4. Build and install

dotnet build

This creates a .punk file in your output directory. Copy it to:

%AppData%\PixlPunkt\Plugins\

Creating a Custom Tool

using PixlPunkt.PluginSdk.Tools;
using PixlPunkt.PluginSdk.Tools.Builders;

public class MyCustomTool : PluginToolBase
{
    public override string Id => "mytool";
    public override string DisplayName => "My Tool";
    public override string Description => "A custom drawing tool";
    
    // Optional: Define a keyboard shortcut
    public override KeyBinding? Shortcut => new(VirtualKey.K, Ctrl: true);
    
    public override void OnStrokeBegin(ToolStrokeContext ctx)
    {
        // Called when the user starts drawing
    }
    
    public override void OnStrokeMove(ToolStrokeContext ctx)
    {
        // Called as the user drags
        // Access pixels via ctx.Surface
    }
    
    public override void OnStrokeEnd(ToolStrokeContext ctx)
    {
        // Called when the user releases
    }
}

Documentation

Plugin Package Format (.punk)

When you build with <PackAsPlugin>true</PackAsPlugin>, the SDK automatically creates a .punk file containing:

  • Your compiled plugin DLL
  • A manifest.json with plugin metadata
  • Any additional dependencies

The .punk format is simply a ZIP archive that PixlPunkt extracts and loads at startup.

Requirements

  • .NET 10.0 or later
  • PixlPunkt 1.0.0 or later

License

This SDK is licensed under the MIT License.

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
1.0.2 181 12/25/2025