用C QuickFill /洪水填充算法#/ VB.NET [英] QuickFill/flood fill algorithm in C#/VB.NET

查看:548
本文介绍了用C QuickFill /洪水填充算法#/ VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个洪水填充算法,以填补现有栅格的形状与各种颜色和填充图案。据我所知,在QuickFill算法是做倾倒填充的最佳途径。我发现了一些实现的,但他们都是在C ++中,并使用Windows SDK的功能。问题是,我需要一个.NET实现。

I need a flood fill algorithm to fill existing raster shapes with various colors and fill patterns. From what I know, the QuickFill algorithm is the best way to do a flood fill. I've found a number of implementations, but they are all in C++ and use Windows SDK functions. The problem is that I need a .NET implementation.

如果差来差我可以写一个新的实现,但我宁愿使用现有的执行(希望没有错误)。任何人是否知道在C中现有的颜色填充执行#/ VB.NET?

If worse comes to worse I can write a new implementation, but I would rather use an existing implementation (that hopefully doesn't have bugs). Is anyone aware of an existing flood fill implementation in C#/VB.NET?

谢谢, 埃里克

推荐答案

我想了很多与 Aforge图书馆工作< /一>,有两个很好的FlodFill实现,但两者都是4个方向而已。

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

如果您需要其他实现存在两个code项目的文章的颜色填充算法在C#和GDI + 队列线性洪水填充:快速颜色填充算法

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.

如果你喜欢挖code和学习,还有就是涂料净项目有外观极好的洪水填充实现。

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

这篇关于用C QuickFill /洪水填充算法#/ VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆