Direct2D has been a significant obstacle for running Paint.NET on WINE, as it will never be fully compatible. To address this, Paint.NET has developed an internal rewrite of Direct2D, stored in a specific DLL. This rewrite was created by an external contributor, Claude, through reverse engineering.
Most of the code is 'vibe coded,' meaning it has not undergone thorough review, and the development process relied on trust. The codebase is large, with 180,000 lines, compared to the 700,000 lines of the entire application.
The development involved significant effort to manage resources correctly and reverse engineer formulas for Direct2D effects. The process included oversight to correct resource management issues and architectural decisions.
This approach allows Paint.NET to function on WINE despite incomplete Direct2D support, highlighting a method for handling complex dependencies through reverse engineering.

