Example #1
0
        void CreateFlashAnimation(StrokeCollection strokes)
        {
            Rect  bound = strokes.GetBounds();
            Point from  = new Point(bound.Left + bound.Width / 2, bound.Top + bound.Height / 2);

            AnimationLibrary.Current.GetFlashAnimationSync(bound, (to) =>
            {
                AnimationObj obj = AnimationEngine.AddSeriesActionsAnimation(strokes, AnimationActionType.Translate, center, from, to);
                obj.Begin();
            });
        }
Example #2
0
        private void CreateSwingAnimation(StrokeCollection strokes, Point centerOffset)
        {
            Rect  bound = strokes.GetBounds();
            Point from  = new Point(0, 0);

            AnimationLibrary.Current.GetSwingAnimationSync(bound, 1, 30, (to) =>
            {
                AnimationObj obj = AnimationEngine.AddSeriesActionsAnimation(strokes, AnimationActionType.Rotate, centerOffset, from, to, true);
                obj.Begin();
            });
        }
Example #3
0
        private void CreateBlinkAnimation(StrokeCollection strokes, AOrientation oritation)
        {
            Rect  bound = strokes.GetBounds();
            Point from  = new Point(1, 1);

            AnimationLibrary.Current.GetBlinkAnimationSync(bound, oritation, 2, 0.2, (to) =>
            {
                AnimationObj obj = AnimationEngine.AddSeriesActionsAnimation(strokes, AnimationActionType.Scale, center, from, to, true);
                obj.Begin();
            });
        }
Example #4
0
        private void CreateShakeAnimation(StrokeCollection strokes, AOrientation oritation)
        {
            Rect  bound = strokes.GetBounds();
            Point from  = new Point(bound.Left + bound.Width / 2, bound.Top + bound.Height / 2);

            AnimationLibrary.Current.GetShakeAnimationSync(bound, oritation, 5, (to) =>
            {
                AnimationObj obj = AnimationEngine.AddSeriesActionsAnimation(strokes, AnimationActionType.Translate, center, from, to, true);
                obj.Begin();
            });
        }