예제 #1
0
        /// <summary>Paints the ROI into the supplied window.</summary>
        public override void draw(hvppleDotNet.HWindow window, int imageWidth, int imageHeight)
        {
            window.DispLine(row1, col1, row2, col2);
            window.DispObj(arrowHandleXLD);              //window.DispRectangle2( row2, col2, 0, 25, 25);

            window.SetDraw("fill");
            window.DispRectangle2(row1, col1, 0, 8, 8);
            window.DispRectangle2(midR, midC, 0, 8, 8);
            window.SetDraw("margin");
        }
예제 #2
0
        /// <summary>
        /// Paints the active handle of the ROI object into the supplied window.
        /// </summary>
        public override void displayActive(hvppleDotNet.HWindow window, int imageWidth, int imageHeight)
        {
            window.SetDraw("fill");
            switch (activeHandleIdx)
            {
            case 0:
                window.DispRectangle2(row1, col1, 0, 8, 8);
                break;

            case 1:
                window.DispObj(arrowHandleXLD);                         //window.DispRectangle2(row2, col2, 0, 25, 25);
                break;

            case 2:
                window.DispRectangle2(midR, midC, 0, 8, 8);
                break;
            }
            window.SetDraw("margin");
        }
예제 #3
0
        /// <summary>Paints the ROI into the supplied window</summary>
        /// <param name="window">HALCON window</param>
        public override void draw(hvppleDotNet.HWindow window, int imageWidth, int imageHeight)
        {
            contour.Dispose();
            contour.GenCircleContourXld(midR, midC, radius, startPhi,
                                        (startPhi + extentPhi), circDir, 1.0);

            double littleRecSize = getHandleWidth(imageWidth, imageHeight);

            window.DispObj(contour);
            window.DispLine(startR, startC, midR, midC);
            window.DispLine(extentR, extentC, midR, midC);

            window.SetDraw("fill");
            window.DispRectangle2(sizeR, sizeC, 0, littleRecSize, littleRecSize);
            window.DispRectangle2(midR, midC, 0, littleRecSize, littleRecSize);
            window.DispRectangle2(startR, startC, startPhi, littleRecSize, littleRecSize);
            window.DispRectangle2(extentR, extentC, 0, littleRecSize, littleRecSize);
            window.SetDraw("margin");
        }