首页 > 其他 > 详细

画波兰线

时间:2014-01-24 11:12:42      阅读:408      评论:0      收藏:0      [点我收藏+]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
private void DrawWave(Graphics g,Point start, Point end)
        {
            Pen pen = Pens.Red;
            if ((end.X - start.X) > 4)
            {
                var pl = new ArrayList();
                for (int i = start.X; i <= (end.X - 2); i += 4)
                {
                    pl.Add(new Point(i, start.Y));
                    pl.Add(new Point(i + 2, start.Y + 2));
                }
                Point[] p = (Point[])pl.ToArray(typeof(Point));
                g.DrawLines(pen, p);
            }
            else
            {
                g.DrawLine(pen, start, end);
            }
        }
 
        private void uC_SmartTagSupport1_Paint(object sender, PaintEventArgs e)
        {
            int y = (uC_SmartTagSupport1.Top + uC_SmartTagSupport1.Height - 1);
            int x = uC_SmartTagSupport1.Left;
 
            DrawWave(e.Graphics, new Point(1, uC_SmartTagSupport1.Height - 3), new Point(100, uC_SmartTagSupport1.Height - 3));
        }

  

画波兰线

原文:http://www.cnblogs.com/perock/p/3531863.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!