示例#1
0
 public override void Draw(HalconDotNet.HWindow window)
 {
     _circularArc.Dispose();
     _circularArc.GenCircleContourXld(_locateRow, _locateCol, _radius, _startPhi, (_startPhi + _extentPhi), _circularArcDir, 1.0);
     window.DispObj(_circularArc);
     window.DispRectangle2(_sizeRow, _sizeCol, 0, 5, 5);
     window.DispRectangle2(_locateRow, _locateCol, 0, 5, 5);
     window.DispRectangle2(_startRow, _startCol, _startPhi, 5, 5);
     window.DispObj(_arrowHandle);
 }
示例#2
0
        /// <summary>
        /// Repaints the HALCON window 'hwnd'
        /// </summary>
        /// <param name="hwnd"></param>
        public void Repaint(HalconDotNet.HWindow hwnd)
        {
            int count = this._hObjList.Count;

            InteractiveROI.HObjectEntry hobjentry;

            HalconDotNet.HSystem.SetSystem("flush_graphic", "false"); //不更新图形变量
            hwnd.ClearWindow();
            this._GC.LastGCSettings.Clear();

            //显示图像,应用图形上下文
            for (int i = 0; i < count; i++)
            {
                hobjentry = (InteractiveROI.HObjectEntry) this._hObjList[i];
                this._GC.ApplyGraphicSettings(hwnd, hobjentry.GCSettings);
                hwnd.DispObj(hobjentry.HObj);
            }

            this.NotifyInfo("加载图像并应用图形上下文完成");

            if ((this._ROICtrller != null) && (this._ROIDispMode == MODE_INCLUDE_ROI))
            {
                this._ROICtrller.PaintData(hwnd);
            }

            HalconDotNet.HSystem.SetSystem("flush_graphic", "true"); //更新图形变量
            hwnd.SetColor("black");
            hwnd.DispLine(-100.0, -100.0, -101.0, -101.0);           //不知何用
        }
示例#3
0
        public override void DisplayActiveHandle(HalconDotNet.HWindow window)
        {
            switch (_activeHandleIdx)
            {
            //定位圆心
            case 0:
                window.DispRectangle2(_locateRow, _locateCol, 0, 5, 5);
                break;

            //缩放边点
            case 1:
                window.DispRectangle2(_sizeRow, _sizeCol, 0, 5, 5);
                break;

            //弧段起始角点
            case 2:
                window.DispRectangle2(_startRow, _startCol, _startPhi, 5, 5);
                break;

            //弧段终止角点(箭头)
            case 3:
                window.DispObj(_arrowHandle);
                break;

            default:
                break;
            }
        }
示例#4
0
 public override void Draw(HalconDotNet.HWindow window)
 {
     window.DispLine(_startRow, _startCol, _extentRow, _extentCol);
     window.DispRectangle2(_startRow, _startCol, 0, 4, 4);
     window.DispObj(_arrowHandle);
     window.DispRectangle2(_locateRow, _locateCol, 0, 4, 4);
 }
示例#5
0
        public override void DisplayActiveHandle(HalconDotNet.HWindow window)
        {
            switch (_activeHandleIdx)
            {
            //定位中心
            case 0:
                window.DispRectangle2(_locateRow, _locateCol, 0, 4, 4);
                break;

            //线段起点
            case 1:
                window.DispRectangle2(_startRow, _startCol, 0, 4, 4);
                break;

            //线段终点箭头
            case 2:
                window.DispObj(_arrowHandle);
                break;

            default:
                break;
            }
        }