using-and-extending-gdi-plus

Installation
SKILL.md

Using and Extending GDI+ in WinForms

These rules apply when using GDI+ for drawing in the WinForms runtime and when adding new drawing APIs to System.Drawing. For control-level API additions (properties, events, etc.), see the new-control-api skill. For writing tests for rendering APIs, see the gdi-rendering-tests skill.

Golden rule: Cache what you can, dispose what you must, and always restore graphics state after modifying it.


1. Object Caching for Performance

1.1 Cached Pen and SolidBrush objects

Installs
2
Repository
dotnet/winforms
GitHub Stars
4.8K
First Seen
Mar 30, 2026
using-and-extending-gdi-plus — dotnet/winforms