Exemplo n.º 1
0
        public void AttachDrawObj(HDrawingObject obj)
        {
            drawing_objects.Add(obj);
            obj.OnDrag(SobelFilter);
            obj.OnAttach(SobelFilter);
            obj.OnResize(SobelFilter);
            obj.OnSelect(OnSelectDrawingObject);
            obj.OnAttach(SobelFilter);

            //HObject region = null;

            //if (obj.GetDrawingObjectParams("type") == "line")
            //{
            //    HTuple a = obj.GetDrawingObjectParams("row1");
            //    HOperatorSet.GenRegionLine(out region, obj.GetDrawingObjectParams("row1"),
            //        obj.GetDrawingObjectParams("column1"), obj.GetDrawingObjectParams("row2"),
            //        obj.GetDrawingObjectParams("column2"));
            //}
            //else
            //{
            //    region = new HRegion(obj.GetDrawingObjectIconic());
            //}

            //AddToStack(region);
            if (selected_drawing_object == null)
            {
                selected_drawing_object = obj;
            }
            // hsmartControl.HalconWindow.AttachDrawingObjectToWindow(obj);
            HOperatorSet.AttachDrawingObjectToWindow(m_windowHandle, obj);
        }
Exemplo n.º 2
0
 public void AttachDrawObj(HDrawingObject obj)
 {
     drawing_objects.Add(obj);
     // The HALCON/C# interface offers convenience methods that
     // encapsulate the set_drawing_object_callback operator.
     obj.OnDrag(user_actions.SobelFilter);
     obj.OnAttach(user_actions.SobelFilter);
     obj.OnResize(user_actions.SobelFilter);
     obj.OnSelect(OnSelectDrawingObject);
     obj.OnAttach(user_actions.SobelFilter);
     //if (selected_drawing_object == null)
     selected_drawing_object = obj;
     halconWindow.HalconWindow.AttachDrawingObjectToWindow(obj);
 }