예제 #1
0
        //测量圆或圆弧2
        private void buttonDrawCircle2_Click(object sender, EventArgs e)
        {
            this.tabControl1.SelectedIndex = 0;
            //hWindowControl1.HalconWindow.ClearWindow();
            //HOperatorSet.DispObj(getImage, hwindow);
            hWindowControl1.Focus();
            HOperatorSet.SetLineWidth(hwindow, 2);
            HOperatorSet.SetDraw(hwindow, "margin");

            HObject Circle2;

            HOperatorSet.GenEmptyObj(out Circle2);
            Circle2.Dispose();

            HOperatorSet.SetColor(hwindow, "yellow");
            HOperatorSet.DrawCircleMod(hwindow, ImageHeight / 2, ImageWidth / 2, 200,
                                       out Circle2RowDraw, out Circle2ColumnDraw, out Circle2RadiusDraw);
            HOperatorSet.SetColor(hwindow, "green");
            HOperatorSet.GenCircle(out Circle2, Circle2RowDraw, Circle2ColumnDraw, Circle2RadiusDraw);
            HOperatorSet.DispObj(Circle2, hwindow);
        }