图形技术(波形图的绘制)

2011070412225531.jpg

核心代码:

 Graphics graphics = this.CreateGraphics();
            Pen myPen=new Pen(Color.Black, 1);
            int beginX = 50;
            int beginY = 65;
            int height = 35;
            int width = 50;
            Point pointX1 = new Point(beginX, beginY);
            Point pointY1 = new Point(beginX + 210, beginY);
            Point pointX2 = new Point(beginX, beginY - 45);
            Point pointY2 = new Point(beginX, beginY + 45);
            graphics.DrawLine(myPen, pointX1, pointY1);
            graphics.DrawLine(myPen, pointX2, pointY2);
            graphics.DrawBezier(myPen, beginX, beginY, beginX + 15, beginY - height, beginX + 40, beginY - height, beginX + width, beginY);
            graphics.DrawBezier(myPen, beginX + width, beginY, beginX + width + 15, beginY + height,
                beginX + width + 40, beginY + height, beginX + width * 2, beginY);
            graphics.DrawBezier(myPen, beginX + width * 2, beginY, beginX + width * 2 + 15, beginY - height,
                beginX + width * 2 + 40, beginY - height, beginX + width * 3, beginY);
            graphics.DrawBezier(myPen, beginX + width * 3, beginY, beginX + width * 3 + 15, beginY + height,
                beginX + width * 3 + 40, beginY + height, beginX + width * 4, beginY);

转载于:https://www.cnblogs.com/msAspnet/archive/2011/07/04/2097289.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值