Example #1
0
        public void Draw(HWindow hWindow)
        {
            hWindow.SetLineWidth(2);

            for (int i = 0; i < crossList.Count; i++)
            {
                hWindow.SetColor(crossList[i].Color);
                hWindow.DispCross((double)crossList[i].Pixel.Y, (double)crossList[i].Pixel.X, crossList[i].Size, 0);
            }
        }
 /// <summary>
 /// 連續放大鏡模式 Action
 /// </summary>
 /// <param name="e"></param>
 private void doZoomContinueAction(HalconDotNet.HMouseEventArgs e)
 {
     if (_enableZoomContinue)
     {
         activateZoomWindow((int)e.X, (int)e.Y);
         _enableZoomContinue = false;
     }
     if (ZoomWindow != null)
     {
         resetZoomWindow(e);
         ZoomWindow.SetColor("red");
         ZoomWindow.DispCross(e.Y, e.X, 16.0, 0.785398);
         ZoomWindow.SetColor(this.ZoomWindowColor);
     }
 }
 public void Draw(HWindow window, HObject img, bool isShow)
 {
     window.ClearWindow();
     HOperatorSet.DispObj(img, window);
     if (isShow)
     {
         window.SetLineWidth(2);
         window.SetDraw("margin");
         window.SetColor("green");
         window.DispRectangle1(Row1, Col1, Row2, Col2);
         window.SetColor("red");
         window.SetLineWidth(1);
         window.DispRectangle1(RowMark - 5, ColMark - 5, RowMark + 5, ColMark + 5);
         window.DispCross(RowMark, ColMark, 35, 0);
         window.SetDraw("fill");
         window.SetColor("blue");
         window.DispRectangle1(Row1 - 6, Col1 - 6, Row1 + 6, Col1 + 6);
         window.DispRectangle1(Row1 - 6, Col2 - 6, Row1 + 6, Col2 + 6);
         window.DispRectangle1(Row2 - 6, Col1 - 6, Row2 + 6, Col1 + 6);
         window.DispRectangle1(Row2 - 6, Col2 - 6, Row2 + 6, Col2 + 6);
         //HOperatorSet.OpenFramegrabber()
     }
 }