Ejemplo n.º 1
0
        private AnimationSet AnimateGhostEllipse(double ellipseX, double ellipseY)
        {
            double width    = GhostCanvas.Width;
            double height   = GhostCanvas.Height;
            double ElRadius = GhostEllipse.Width / 2;

            AnimationSet anim = GhostShadow.Scale((float)1.5, (float)1.5, (float)ElRadius, (float)ElRadius, 100).Then().Scale(1, 1, (float)ElRadius, (float)ElRadius, 100).Then().Offset(offsetX: (float)((ellipseX * width) - ElRadius), offsetY: (float)((ellipseY * height) - ElRadius), duration: 800, easingType: EasingType.Quadratic);

            return(anim);
        }
Ejemplo n.º 2
0
        private AnimationSet AnimateChaosEllipse(double ellipseX, double ellipseY)
        {
            double width    = ChaosCanvas.Width;
            double height   = ChaosCanvas.Height;
            double ElRadius = ChaosEllipse.Width / 2;

            // Animations are hardcoded at 1000 ms now - so the durations need to add up to that
            AnimationSet anim = ChaosShadow.Scale((float)1.5, (float)1.5, (float)ElRadius, (float)ElRadius, 100).Then().Scale(1, 1, (float)ElRadius, (float)ElRadius, 100).Then().Offset(offsetX: (float)((ellipseX * width) - ElRadius), offsetY: (float)((ellipseY * height) - ElRadius), duration: 800, easingType: EasingType.Quadratic);

            return(anim);
        }