用C#绘制图形类 [英] Drawing with Graphics class in C#

查看:114
本文介绍了用C#绘制图形类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用鼠标在C#中绘制,就像鼠标是一支笔。
我尝试使用Graphics类,使用DrawLines方法接收一个点数组作为参数。



你认为这是更好的选择,还是哟知道如果有另一个简单的方法来做到这一点?



感谢您提前



问候。

解决方案

请看这个示例:

http://www.codeproject.com/KB/graphics/drawtools.aspx



具体来说,铅笔工具可以满足您的需求。


I would like to draw in C# with the mouse, like if the mouse were a pen. I am trying with Graphics class, using DrawLines method receiving an array of points as parameter.

Do you think this is the better option, or do yo know if is there another easy way to do it?

Thanks in advance

Regards.

解决方案

Look at this sample:

http://www.codeproject.com/KB/graphics/drawtools.aspx

Specifically, the Pencil tool does what you need.

这篇关于用C#绘制图形类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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