如何实现点击线路按钮实现画折线

更新时间:02-02 教程 由 浅殇 分享

如何实现点击线路按钮实现画折线?

鼠标每次单击都保存当前x,y,然后每个保存的x,y调用

drawline

,如 :// Create pen.Pen blackPen = new Pen(Color.Black, 3);// Create coordinates of points that define line.int x1 = 100;int y1 = 100;int x2 = 500;int y2 = 100;// Draw line to screen.e.Graphics.DrawLine(blackPen, x1, y1, x2, y2);

声明:关于《如何实现点击线路按钮实现画折线》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2204427.html