zoukankan      html  css  js  c++  java
  • 图形技术(波形图的绘制)

    核心代码:

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

  • 相关阅读:
    Python中 sys.argv[]的用法简明解释
    Python--文件操作和集合
    Python--各种参数类型
    Python-- 字符串格式化 (%操作符)
    Python--绝对路径和相对路径
    Python3.x和Python2.x的区别
    关于ArrayList使用中的注意点
    Sun公司建议的Java类定义模板
    SWT组件之Table浅析
    mysql的相关命令整理(二)
  • 原文地址:https://www.cnblogs.com/msAspnet/p/2097289.html
Copyright © 2011-2022 走看看