画波兰线

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));
        }

  

画波兰线

上一篇:ubuntu如何安装samba服务器?


下一篇:【转】随便谈谈用canvas来实现文字图片粒子化