예제 #1
0
        private void DrawBaseList()
        {
            GL.glLineWidth(2.0f);      //设置坐标轴粗细
            MyGL_glBegin(GL.GL_LINES); //画不闭合折线
            GL.glColor3fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.SkyBlue));

            MyGL_glVertex2i(50, this.Height - 30);
            MyGL_glVertex2i(350, this.Height - 30);

            MyGL_glVertex2i(400, this.Height - 30);
            MyGL_glVertex2i(650, this.Height - 30);

            MyGL_glVertex2i(700, this.Height - 30);
            MyGL_glVertex2i(960, this.Height - 30);

            GL.glColor3fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.SystemColors.Control));

            MyGL_glVertex2i(390, 0);
            MyGL_glVertex2i(390, this.Height);

            MyGL_glVertex2i(690, 0);
            MyGL_glVertex2i(690, this.Height);
            MyGL_glEnd();
            Textrue.DrawText("左末", new Point(50, this.Height - 25), 23, Color.Green, 255.0f);
            Textrue.DrawText("左线", new Point(95, this.Height - 25), 23, Color.Black, 255.0f);
            Textrue.DrawText("左始", new Point(140, this.Height - 25), 23, Color.Blue, 255.0f);
            Textrue.DrawText("中线", new Point(185, this.Height - 25), 23, Color.Red, 255.0f);
            Textrue.DrawText("右始", new Point(230, this.Height - 25), 23, Color.Blue, 255.0f);
            Textrue.DrawText("右线", new Point(275, this.Height - 25), 23, Color.Black, 255.0f);
            Textrue.DrawText("右末", new Point(320, this.Height - 25), 23, Color.Green, 255.0f);

            Textrue.DrawText("基本参数", new Point(400, this.Height - 25), 25, Color.Black, 255.0f);
            Textrue.DrawText("控制固参", new Point(700, this.Height - 25), 25, Color.Black, 255.0f);
        }
예제 #2
0
 private void DrawBackGroundList()
 {
     MyGL_glBegin(GL.GL_QUADS);
     GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(Color.White, 255));
     MyGL_glVertex2i(this.Width, this.Height);
     MyGL_glVertex2i(0, this.Height);
     MyGL_glVertex2i(0, 0);
     MyGL_glVertex2i(this.Width, 0);
     MyGL_glEnd();
 }
예제 #3
0
        private void DrawConstChooseList()
        {
            GL.glPointSize(8.0f);
            MyGL_glBegin(GL.GL_POINTS);
            GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.FromArgb(150, 50, 150), 255));

            MyGL_glVertex2i(696, this.Height - 40 - constdatatabnum * 20);

            MyGL_glEnd();
        }
예제 #4
0
 private void DrawLcrScrollBarsList()
 {
     MyGL_glBegin(GL.GL_QUADS);
     GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.FromArgb(170, 170, 170), 255));
     MyGL_glVertex2i(360, this.Height - LcrEye_y);
     MyGL_glVertex2i(360, (int)((float)this.Height - this.Height * 12 / 70 - LcrEye_y));
     MyGL_glVertex2i(385, (int)((float)this.Height - this.Height * 12 / 70 - LcrEye_y));
     MyGL_glVertex2i(385, this.Height - LcrEye_y);
     MyGL_glEnd();
 }
예제 #5
0
        //四个临时变量记录矩形选取框位置

        private void DrawXYline()
        {
            MyGL_glBegin(GL.GL_LINES);
            GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(Color.White, 255));
            MyGL_glVertex2i(0, this.Height / 2);
            MyGL_glVertex2i(this.Width, this.Height / 2);
            MyGL_glVertex2i(this.Width / 2, 0);
            MyGL_glVertex2i(this.Width / 2, this.Height);
            MyGL_glEnd();
        }
예제 #6
0
        private void DrawMousePointList()
        {
            GL.glLineWidth(1.0f);    //设置线粗细
            MyGL_glBegin(GL.GL_LINES);
            GL.glColor3fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(Color.Blue));


            MyGL_glVertex2i(mouseLocation.X, this.Height);
            MyGL_glVertex2i(mouseLocation.X, 0);
            MyGL_glVertex2i(0, this.Height - mouseLocation.Y);
            MyGL_glVertex2i(this.Width, this.Height - mouseLocation.Y);
            MyGL_glEnd();

            float tmpx = (float)(MaxX + (mouseLocation.X) * (MaxX * 2) / (this.Width));
            float tmpy = (float)(MaxY - (mouseLocation.Y) * (MaxY) / (this.Height));
        }
예제 #7
0
 private void DrawLcrList()
 {
     GL.glColor3fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.White));
     if (Show_Pic_Info == true)
     {
         for (int i = 0; i < Lcr.Count; i++)
         {
             Textrue.DrawText(Lcr[i].LEnd.ToString(), new Point(50, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Green, 255.0f);
             Textrue.DrawText(Lcr[i].LBlack.ToString(), new Point(95, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Black, 255.0f);
             Textrue.DrawText(Lcr[i].LStart.ToString(), new Point(140, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Blue, 255.0f);
             Textrue.DrawText(Lcr[i].Center.ToString(), new Point(185, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Red, 255.0f);
             Textrue.DrawText(Lcr[i].RStart.ToString(), new Point(230, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Blue, 255.0f);
             Textrue.DrawText(Lcr[i].RBlack.ToString(), new Point(275, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Black, 255.0f);
             Textrue.DrawText(Lcr[i].REnd.ToString(), new Point(320, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Green, 255.0f);
             Textrue.DrawText((i + 1).ToString(), new Point(10, this.Height - 50 - i * 20 + (int)((float)LcrEye_y * 70 / 12 * (this.Height - 28) / this.Height)), 20, Color.Black, 255.0f);
         }
     }
 }
예제 #8
0
        private void DrawParScrollBarsList()
        {
            MyGL_glBegin(GL.GL_QUADS);
            GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.FromArgb(170, 170, 170), 255));

            MyGL_glVertex2i(660, this.Height - ParEye_y);
            if (Par_Num > 12)
            {
                MyGL_glVertex2i(660, (int)((float)this.Height - this.Height * (Par_Num > 12 ? 12 : Par_Num) / Par_Num - ParEye_y));
                MyGL_glVertex2i(685, (int)((float)this.Height - this.Height * (Par_Num > 12 ? 12 : Par_Num) / Par_Num - ParEye_y));
            }
            else
            {
                MyGL_glVertex2i(660, 0);
                MyGL_glVertex2i(685, 0);
            }
            MyGL_glVertex2i(685, this.Height - ParEye_y);
            MyGL_glEnd();
        }
예제 #9
0
        private void DrawDataPoint()
        {
            GL.glPointSize(7.0f);
            MyGL_glBegin(GL.GL_POINTS);
            GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.FromArgb(150, 50, 150), 255));
            if (Data.DataPoint.Count > datasize)
            {
                Data.DataPoint.RemoveRange(0, Data.DataPoint.Count - datasize);
            }
            if (Data.DataPoint.Count != 0)
            {
                for (int i = 0; i < Data.DataPoint.Count; i++)
                {
                    MyGL_glVertex2i((int)(Data.DataPoint[i].X_Value * this.Width / MaxX / 2 + this.Width / 2), (int)(this.Height / 2 - Data.DataPoint[i].Y_Value * this.Height / 2 / MaxY));
                }
            }

            MyGL_glEnd();
        }
예제 #10
0
        private void DrawConstScrollBarsList()
        {
            MyGL_glBegin(GL.GL_QUADS);
            GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.FromArgb(170, 170, 170), 255));

            MyGL_glVertex2i(967, this.Height - ConstEye_y);
            if (Const_Num > 12)
            {
                MyGL_glVertex2i(967, (int)((float)this.Height - this.Height * (Const_Num > 12 ? 12 : Const_Num) / Const_Num - ConstEye_y));
                MyGL_glVertex2i(992, (int)((float)this.Height - this.Height * (Const_Num > 12 ? 12 : Const_Num) / Const_Num - ConstEye_y));
            }
            else
            {
                MyGL_glVertex2i(967, 0);
                MyGL_glVertex2i(992, 0);
            }
            MyGL_glVertex2i(992, this.Height - ConstEye_y);

            MyGL_glEnd();
        }
예제 #11
0
        private void DrawFrameList()
        {
            MyGL_glLoadIdentity();
            MyGL_glTranslatef(0, 0, 0);
            MyGL_glBegin(GL.GL_QUADS);
            GL.glColor4fv(OpenGLPublicFunction.GetGLColorFromDotNetColor(System.Drawing.Color.White, 255));
            MyGL_glVertex2i(0, this.Height);
            MyGL_glVertex2i(0, this.Height - 30);
            MyGL_glVertex2i(355, this.Height - 30);
            MyGL_glVertex2i(355, this.Height);

            MyGL_glVertex2i(400, this.Height);
            MyGL_glVertex2i(400, this.Height - 30);
            MyGL_glVertex2i(650, this.Height - 30);
            MyGL_glVertex2i(650, this.Height);

            MyGL_glVertex2i(700, this.Height);
            MyGL_glVertex2i(700, this.Height - 30);
            MyGL_glVertex2i(960, this.Height - 30);
            MyGL_glVertex2i(960, this.Height);
            MyGL_glEnd();
        }