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

  • 相关阅读:
    c/c++指针数组和数组指针
    c/c++指针传参
    c/c++指针理解
    c/c++容器操作
    c/c++ 数组传参
    c/c++ 结构体传参问题
    c++ 创建对象的三种方法
    c/c++ 随机数生成
    c++预处理指令
    团队冲刺第二阶段01
  • 原文地址:https://www.cnblogs.com/msAspnet/p/2097289.html
Copyright © 2011-2022 走看看