Esempio n. 1
0
 private static ManipulationVelocities ConvertVelocities(ManipulationVelocities2D velocities)
 {
     return(new ManipulationVelocities(
                new Vector(velocities.LinearVelocityX, velocities.LinearVelocityY),
                AngleUtil.RadiansToDegrees(velocities.AngularVelocity),
                new Vector(velocities.ExpansionVelocityX, velocities.ExpansionVelocityY)));
 }
Esempio n. 2
0
 private static ManipulationDelta ConvertDelta(ManipulationDelta2D delta, ManipulationDelta add)
 {
     if (add != null)
     {
         return(new ManipulationDelta(
                    new Vector(delta.TranslationX + add.Translation.X, delta.TranslationY + add.Translation.Y),
                    AngleUtil.RadiansToDegrees(delta.Rotation) + add.Rotation,
                    new Vector(delta.ScaleX * add.Scale.X, delta.ScaleY * add.Scale.Y),
                    new Vector(delta.ExpansionX + add.Expansion.X, delta.ExpansionY + add.Expansion.Y)));
     }
     else
     {
         return(new ManipulationDelta(
                    new Vector(delta.TranslationX, delta.TranslationY),
                    AngleUtil.RadiansToDegrees(delta.Rotation),
                    new Vector(delta.ScaleX, delta.ScaleY),
                    new Vector(delta.ExpansionX, delta.ExpansionY)));
     }
 }