如何为MS Paint等区域填充颜色 [英] How to fill color to an area like MS Paint

查看:82
本文介绍了如何为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!

推荐答案

最简单的方法是设置 url?sa = t& rct = j& q = graphics.fillpath& source = web& cd = 1& ved = 0CCAQFjAA& url = http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fsystem. drawing.graphics.fillpath.aspx& ei = VkPiTs9Y7NPhBNSaiIwF& usg = AFQjCNGCTTfeyiWxlF-n1pKAkxQmTFN4JQ& sig2 = sR7wO1EfMvLJAUcbn7V5XQ"shape => 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屋!

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