Beispiel #1
0
        private void LoadGraphics()
        {
            PolarGraphicCoordinate pgc = new PolarGraphicCoordinate(Origin, Target);

            var topleft     = new PolarGraphicCoordinate(Origin, Width, pgc.PerpendicularPositive().AngleDegree);
            var bottomleft  = new PolarGraphicCoordinate(Origin, Width, pgc.PerpendicularNegative().AngleDegree);
            var topright    = new PolarGraphicCoordinate(Target, Width, pgc.PerpendicularPositive().AngleDegree);
            var bottomright = new PolarGraphicCoordinate(Target, Width, pgc.PerpendicularNegative().AngleDegree);

            var y  = topleft.Target.Y - bottomleft.Target.Y;
            var y0 = topleft.Target.Y - topright.Target.Y;
            var y2 = topright.Target.Y - bottomleft.Target.Y;
            var y3 = topright.Target.Y - bottomright.Target.Y;
            var y4 = bottomleft.Target.Y - bottomright.Target.Y;

            _square = new Square(bottomleft.Target, topleft.Target, topright.Target, bottomright.Target, Color);
        }