ApeFree.Cake2D.Gdi 1.0.2-beta260905

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

ApeFree.Cake2D.Gdi

NuGet License

ApeFree.Cake2D.Gdi 是 ApeFree.Cake2D 平面绘图框架基于 Windows GDI+ 技术的渲染实现库。它提供了基于 WinForms 的画布控件(如 Cake2DControl、Cake2DBox),让开发者能在 Windows 窗体应用中开箱即用地展示并交互 Cake2D 矢量图形图层。


🌟 核心特性

  • 🖥 原生 GDI+ 硬件/软件加速:在 Windows 平台上提供极简、低依赖的渲染通道。
  • 📦 开箱即用的 WinForms 控件:
    • Cake2DControl:支持鼠标平移、缩放、图元点击与悬停事件的交互画布控件。
    • Cake2DBox:用于静态或图层展示的轻量化控件。
    • Cake2DCanvasForm:全屏或独立调试用画布窗口。

📦 安装

dotnet add package ApeFree.Cake2D.Gdi

🚀 快速上手

在 WinForms 窗体中添加 Cake2DControl 控件并绘制图形:

using System.Drawing;
using ApeFree.Cake2D.Controls;
using ApeFree.Cake2D.Elements.Primitives;

// 1. 初始化控件
var cakeControl = new Cake2DControl { Dock = DockStyle.Fill };
this.Controls.Add(cakeControl);

// 2. 创建并添加 2D 图元
var circle = new CircleElement
{
    Radius = 40,
    FillColor = Color.LightGreen,
    StrokeColor = Color.DarkGreen,
    Location = new PointF(100, 100)
};

cakeControl.Canvas.Elements.Add(circle);

// 3. 刷新画布
cakeControl.Invalidate();

📄 开源许可证

本项目基于 Apache-2.0 协议开源。

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
.NET Framework net452 is compatible.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ApeFree.Cake2D.Gdi:

Package Downloads
ApeFree.ApeForms

WinForm窗体与UI控件库,包含功能丰富的控件(Metro风格)、对话框、通知弹窗与模板嵌套窗体系统。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2-beta260905 75 9/4/2026
1.0.0-beta260901 76 9/1/2026