Exemplo n.º 1
0
        private void btn_slg_ReDrowROI_Click(object sender, EventArgs e)
        {
            DrawMode(true);//绘制模式开启
            Rectangle1 rectangle1 = Func_Mathematics.ToRectangle1(slgLine.parameter.rectangle2);
            Rectangle2 rectangle2;

            if (rectangle1 != null)
            {
                rectangle1 = Func_HalconFunction.DrawRectangle1Mod(hWindow_Final1.hWindowControl.HalconWindow, rectangle1);//画矩形
                rectangle2 = Func_Mathematics.ToRectangle2(rectangle1);
            }
            else
            {
                rectangle2 = Func_HalconFunction.DrawRectangle2Mod(hWindow_Final1.hWindowControl.HalconWindow, slgLine.parameter.rectangle2);
            }
            DrawMode(false); //绘制模式关闭
            slgLine.parameter.rectangle2 = rectangle2;
            RunOnce();       //运行测试
        }