示例#1
0
 public CustomGL(FigureForm parent)
 {
     viewCenter          = new Vector2(0f, 0f);
     parent.UpdateImage += SetNewImage;
     Paint      += CustomGL_Paint;
     Load       += CustomGL_Load;
     Resize     += CustomGL_Resize;
     MouseDown  += CustomGL_MouseDown;
     MouseMove  += CustomGL_MouseMove;
     MouseUp    += CustomGL_MouseUp;
     MouseWheel += CustomGL_MouseWheel;
 }
示例#2
0
        public void PlotNewFigure(float[] data, int height, string title = null)
        {
            if (title == null)
            {
                title = "";
            }
            else
            {
                title = "-" + title;
            }

            figureCount++;
            FigureForm figure = new FigureForm {
                Text = string.Format($"图像{figureCount}{title}")
            };

            Invoke(new Action(() =>
            {
                figure.Show();
                figure.SetNewImage(data, height);
            }));
        }