Beispiel #1
0
        public override void UpdateVisual()
        {
            var center     = Center;
            var startPoint = BeginLocation;
            var endPoint   = EndLocation;

            ArcShape.Size          = new Size(ToPhysical(SemiMajor), ToPhysical(SemiMinor));
            Figure.StartPoint      = ToPhysical(startPoint);
            ArcShape.Point         = ToPhysical(endPoint);
            ArcShape.RotationAngle = -Inclination.ToDegrees();
            ArcShape.IsLargeArc    = Clockwise ? Math.OAngle(endPoint, center, startPoint) > Math.PI :
                                     Math.OAngle(startPoint, center, endPoint) > Math.PI;
        }
Beispiel #2
0
        public override void UpdateVisual()
        {
            var             center       = ToPhysical(Center);
            var             logicalWidth = LogicalWidth();
            var             major        = ToPhysical(SemiMajor * 2 + logicalWidth);
            var             minor        = ToPhysical(SemiMinor * 2 + logicalWidth);
            double          angle        = -Inclination.ToDegrees();
            RotateTransform rotation     = new RotateTransform();

            rotation.CenterX      = major / 2;
            rotation.CenterY      = minor / 2;
            rotation.Angle        = angle;
            Shape.RenderTransform = rotation;
            Shape.Width           = major;
            Shape.Height          = minor;
            Shape.CenterAt(center);
        }