From fa05ef04ef17737cf3ddd23e4b171e095e6cffc9 Mon Sep 17 00:00:00 2001 From: seungho baek Date: Mon, 8 May 2023 18:18:54 +0900 Subject: [PATCH] [NUI] Add BlendPoint to blend animation of AnimateBetween Signed-off-by: seungho baek --- .../src/internal/Interop/Interop.Animation.cs | 6 +++++ src/Tizen.NUI/src/public/Animation/Animation.cs | 29 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs index 5e12495..0ef3dba 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs @@ -122,6 +122,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); diff --git a/src/Tizen.NUI/src/public/Animation/Animation.cs b/src/Tizen.NUI/src/public/Animation/Animation.cs index 6aecbd3..2c7e6b8 100755 --- a/src/Tizen.NUI/src/public/Animation/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation/Animation.cs @@ -449,6 +449,35 @@ namespace Tizen.NUI } /// + /// 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. + /// + /// + /// 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. + /// + /// + /// In the case of a looping animation, the animation is blended only in the first loop. + /// + [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; + } + } + + /// /// Gets or sets the properties of the animation. /// //ToDo : will raise deprecated-ACR, [Obsolete("Deprecated in API9, will be removed in API11, Use PropertyList instead")] -- 2.7.4