如何为MS Paint等区域填充颜色 [英] How to fill color to an area like MS Paint
本文介绍了如何为MS Paint等区域填充颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在用C#语言编写的程序中,我将任何封闭区域绘制到位图中,但是我不知道如何用我的颜色填充该区域.
有没有什么机构可以帮助我.
In my program in C# language, I drew any closed area into a bitmap, but I dont know how to fill in that area with my color.
Is there any body can help me.
Thank u in advance!
推荐答案
最简单的方法是设置 ^ ]对象,然后使用 FillPath将绘制它并适当地填充它.
第二个链接给出了一个示例.
The easiest way is to set up a GraphicsPath[^] object, and use the Graphics.FillPath[^] method - A GraphicsPath can be any shape, and the FillPath will draw it and fill it appropriately.
The second link gives an example.
这篇关于如何为MS Paint等区域填充颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文