0

我需要一种洪水填充算法来用各种颜色和填充图案填充现有的光栅形状。据我所知,QuickFill 算法是进行洪水填充的最佳方式。我找到了许多实现,但它们都是 C++ 并使用 Windows SDK 函数。问题是我需要一个 .NET 实现。

如果情况变得更糟,我可以编写一个新的实现,但我宁愿使用现有的实现(希望没有错误)。有人知道 C#/VB.NET 中现有的洪水填充实现吗?

4

1 回答 1

2

I like a lot to work with the Aforge Library that has two good FlodFill implementations, but both are 4 directional only.

If you need other implementations there exist two code project articles Flood Fill Algorithms in C# and GDI+ and Queue-Linear Flood Fill: A Fast Flood Fill Algorithm.

And if you like to dig in the code and learn, there is the Paint .Net project that has an excelent flood fill implementation.

于 2010-11-20T02:31:33.553 回答