Exemple #1
0
        public override void OnPaint()


        {
            BackColor = Color.White;
            switch (Entities)

            {
            case Entitykind.Boxentity:
            {
                Box.Paint(this);


                break;
            }

            case Entitykind.PolyCurveExtruder:
            {
                PolyCurveEx.Paint(this);

                break;
            }

            case Entitykind.CoordinateAxis:
            {
                Axis.Paint(this);
                break;
            }

            case Entitykind.TextEntity:
            {
                Text.Paint(this);

                break;
            }

            case Entitykind.Interpolator:

            {
                Interpolator.Paint(this);
                break;
            }

            case Entitykind.Zoom:

            {
                drawSphere(new xyz(0, 0, 0), 7, 80, 80);
                drawBox(new xyz(-10, -10, -1), new xyz(20, 20, 1));
                drawBox(new xyz(0, 0, 0), new xyz(2, 2, 2));

                break;
            }

            case Entitykind.CtrlRectangle:

            {
                PenWidth    = 2;
                PolygonMode = PolygonMode.Line;
                drawPolyLine(Triangle);
                PolygonMode = PolygonMode.Fill;
                PenWidth    = 1;

                break;
            }

            case Entitykind.Profiler:

            {
                Profil.Paint(this);


                break;
            }

            case Entitykind.ActiveCursor:
            {
                PolyCurveEx = new PolyCurveExtruder();
                Loca       _Loca   = new Loca();
                CurveArray Curves0 = new CurveArray();
                Curves0.Count = 4;
                Curves0[0]    = new Line(new xy(-3, -3), new xy(-3, 4));
                Curves0[1]    = new Line(new xy(-3, 4), new xy(4, 4));
                Curves0[2]    = new Line(new xy(4, 4), new xy(4, -3));
                Curves0[3]    = new Line(new xy(4, -3), new xy(-3, -3));

                _Loca.Add(Curves0);
                OpenGlDevice.CheckError();
                CurveArray Curves1 = new CurveArray();
                Curves1.Count = 4;
                Curves1[0]    = new Line(new xy(0, 0), new xy(1, 0));
                Curves1[1]    = new Line(new xy(1, 0), new xy(1, 1));
                Curves1[2]    = new Line(new xy(1, 1), new xy(0, 1));
                Curves1[3]    = new Line(new xy(0, 1), new xy(0, 0));
                _Loca.Add(Curves1);

                PolyCurveEx.DownPlane     = new Plane(new xyz(0, 0, 0), new xyz(0, 0, 1));
                PolyCurveEx.UpPlane       = new Plane(new xyz(0, 0, 4), new xyz(0, 0.5, 1));
                PolyCurveEx.Loca          = _Loca;
                PolyCurveEx.ShowUpPlane   = true;
                PolyCurveEx.ShowDownPlane = true;
                PolyCurveEx.Height        = -1;
                PolyCurveEx.Direction     = new xyz(0, 1, 1);
                PolyCurveEx.Paint(this);

                ActiveC.Paint(this);
                break;
            }


            case Entitykind.SphereEntity:
            {
                Sphere.Paint(this);
                break;
            }

            case Entitykind.Cone:
            {
                Cone.Paint(this);



                break;
            }

            case Entitykind.Arrow:
            {
                Arrow.Paint(this);

                break;
            }

            case Entitykind.VisualBase:
            {
                VisualBase VB = new VisualBase();
                VB.SnappEnable      = false;
                VB.xAxis.ShaftColor = Color.Blue;
                VB.yAxis.ShaftColor = Color.Green;
                VB.zAxis.ShaftColor = Color.Yellow;
                VB.xAxis.TopColor   = Color.Red;
                VB.yAxis.TopColor   = Color.Red;
                VB.zAxis.TopColor   = Color.Red;
                VB.Paint(this);
                break;
            }
            }
            ActiveC.Paint(this);

            base.OnPaint();
        }
Exemple #2
0
 protected override void OnForegroundPaint()
 {
     VB.Paint(this);
 }