[NUI] Add BlendPoint to blend animation of AnimateBetween
authorseungho baek <sbsh.baek@samsung.com>
Mon, 8 May 2023 09:18:54 +0000 (18:18 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 22 May 2023 10:12:20 +0000 (19:12 +0900)
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs
src/Tizen.NUI/src/public/Animation/Animation.cs

index 7e94a96..e6a5969 100755 (executable)
@@ -128,6 +128,12 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_GetProgressNotification")]
             public static extern float GetProgressNotification(global::System.Runtime.InteropServices.HandleRef jarg1);
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_SetBlendPoint")]
+            public static extern void SetBlendPoint(global::System.Runtime.InteropServices.HandleRef csAnimation, float blendPoint);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_GetBlendPoint")]
+            public static extern float GetBlendPoint(global::System.Runtime.InteropServices.HandleRef csAnimation);
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_FinishedSignal")]
             public static extern global::System.IntPtr FinishedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
 
index 017177c..e7ef801 100755 (executable)
@@ -500,6 +500,35 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Sets and Gets the blend point to interpolate animate property
+        ///
+        /// BlendPoint is a value between [0,1], If the value of the keyframe whose progress is 0 is different from the current value,
+        /// the property is animated as it smoothly blends until the progress reaches the blendPoint.
+        /// </summary>
+        /// <remarks>
+        /// The blend point only affects animation registered with AnimateBetween. Other animations operate the same as when Play() is called.
+        /// And the blend point needs to be set before this animation plays. If the blend point changes after playback, animation continuity cannot be guaranteed.
+        /// </remarks>
+        /// <remarks>
+        /// In the case of a looping animation, the animation is blended only in the first loop.
+        /// </remarks>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public float BlendPoint
+        {
+            set
+            {
+                Interop.Animation.SetBlendPoint(SwigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = Interop.Animation.GetBlendPoint(SwigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
+                return ret;
+            }
+        }
+
+        /// <summary>
         /// Gets or sets the properties of the animation.
         /// </summary>
         //ToDo : will raise deprecated-ACR, [Obsolete("Deprecated in API9, will be removed in API11, Use PropertyList instead")]