2 using System.Collections.Generic;
8 /// The AnimatorMotionMapper interface.
10 /// <since_tizen> preview </since_tizen>
11 public interface IAnimatorMotionMapper
14 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
16 /// <since_tizen> preview </since_tizen>
17 double Calculate(double position);
21 /// The LinearMotionMapper class.
23 /// <since_tizen> preview </since_tizen>
24 public class LinearMotionMapper : IAnimatorMotionMapper
27 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
29 /// <since_tizen> preview </since_tizen>
30 public double Calculate(double position)
32 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.Linear, 0, 0);
37 /// The AccelerateMotionMapper class.
39 /// <since_tizen> preview </since_tizen>
40 public class AccelerateMotionMapper : IAnimatorMotionMapper
43 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
45 /// <since_tizen> preview </since_tizen>
46 public double Calculate(double position)
48 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.Accelerate, 0, 0);
53 /// The DecelerateMotionMapper class.
55 /// <since_tizen> preview </since_tizen>
56 public class DecelerateMotionMapper : IAnimatorMotionMapper
59 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
61 /// <since_tizen> preview </since_tizen>
62 public double Calculate(double position)
64 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.Decelerate, 0, 0);
69 /// The SinusoidalMotionMapper class.
71 /// <since_tizen> preview </since_tizen>
72 public class SinusoidalMotionMapper : IAnimatorMotionMapper
75 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
77 /// <since_tizen> preview </since_tizen>
78 public double Calculate(double position)
80 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.Sinusoidal, 0, 0);
85 /// The AccelerateFactorMotionMapper class.
87 /// <since_tizen> preview </since_tizen>
88 public class AccelerateFactorMotionMapper : IAnimatorMotionMapper
91 /// The power factor of AccelerateFactorMotionMapper.
93 /// <since_tizen> preview </since_tizen>
94 public double PowerFactor { get; set; } = 0;
97 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
99 /// <since_tizen> preview </since_tizen>
100 public double Calculate(double position)
102 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.AccelerateFactor, PowerFactor, 0);
107 /// The DecelerateFactorMotionMapper class.
109 /// <since_tizen> preview </since_tizen>
110 public class DecelerateFactorMotionMapper : IAnimatorMotionMapper
113 /// The power factor of DecelerateFactorMotionMapper.
115 /// <since_tizen> preview </since_tizen>
116 public double PowerFactor { get; set; } = 0;
119 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
121 /// <since_tizen> preview </since_tizen>
122 public double Calculate(double position)
124 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.DecelerateFactor, PowerFactor, 0);
129 /// The SinusoidalFactorMotionMapper class.
131 /// <since_tizen> preview </since_tizen>
132 public class SinusoidalFactorMotionMapper : IAnimatorMotionMapper
135 /// The power factor of SinusoidalFactorMotionMapper.
137 /// <since_tizen> preview </since_tizen>
138 public double PowerFactor { get; set; } = 0;
141 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
143 /// <since_tizen> preview </since_tizen>
144 public double Calculate(double position)
146 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.SinusoidalFactor, PowerFactor, 0);
151 /// The DivisorInterpolatedMotionMapper class.
153 /// <since_tizen> preview </since_tizen>
154 public class DivisorInterpolatedMotionMapper : IAnimatorMotionMapper
157 /// The Divisor of DivisorInterpolatedMotionMapper.
159 /// <since_tizen> preview </since_tizen>
160 public double Divisor { get; set; } = 0;
163 /// The power of DivisorInterpolatedMotionMapper.
165 /// <since_tizen> preview </since_tizen>
166 public double Power { get; set; } = 0;
169 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
171 /// <since_tizen> preview </since_tizen>
172 public double Calculate(double position)
174 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.DivisorInterp, Divisor, Power);
179 /// The BounceMotionMapper class.
181 /// <since_tizen> preview </since_tizen>
182 public class BounceMotionMapper : IAnimatorMotionMapper
185 /// The bounces of BounceMotionMapper.
187 /// <since_tizen> preview </since_tizen>
188 public int Bounces { get; set; } = 0;
191 /// The decay factor of BounceMotionMapper.
193 /// <since_tizen> preview </since_tizen>
194 public double DecayFactor { get; set; } = 0;
197 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
199 /// <since_tizen> preview </since_tizen>
200 public double Calculate(double position)
202 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.Bounce, DecayFactor, Bounces);
207 /// The SpringMotionMapper class.
209 /// <since_tizen> preview </since_tizen>
210 public class SpringMotionMapper : IAnimatorMotionMapper
213 /// The wobbles of SpringMotionMapper.
215 /// <since_tizen> preview </since_tizen>
216 public int Wobbles { get; set; } = 0;
219 /// The decay factor of SpringMotionMapper.
221 /// <since_tizen> preview </since_tizen>
222 public double DecayFactor { get; set; } = 0;
225 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
227 /// <since_tizen> preview </since_tizen>
228 public double Calculate(double position)
230 return Interop.Ecore.ecore_animator_pos_map(position, Interop.Ecore.PositionMap.Bounce, DecayFactor, Wobbles);
235 /// The CubicBezierMotionMapper class.
237 /// <since_tizen> preview </since_tizen>
238 public class CubicBezierMotionMapper : IAnimatorMotionMapper
241 /// The X1 of CubicBezierMotionMapper.
243 /// <since_tizen> preview </since_tizen>
244 public double X1 { get; set; } = 0;
247 /// The Y1 of CubicBezierMotionMapper.
249 /// <since_tizen> preview </since_tizen>
250 public double Y1 { get; set; } = 0;
253 /// The X2 of CubicBezierMotionMapper.
255 /// <since_tizen> preview </since_tizen>
256 public double X2 { get; set; } = 0;
259 /// The Y2 of CubicBezierMotionMapper.
261 /// <since_tizen> preview </since_tizen>
262 public double Y2 { get; set; } = 0;
265 /// Maps an input position from 0.0 to 1.0 along a timeline to a position in a different curve.
267 /// <since_tizen> preview </since_tizen>
268 public double Calculate(double position)
270 double[] values = { X1, Y1, X2, Y2 };
271 return Interop.Ecore.ecore_animator_pos_map_n(position, Interop.Ecore.PositionMap.Bounce, values.Length, values);