[NUI] Add RequestAsyncRenderWithFixedSize to text label
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 9 Jul 2024 06:54:16 +0000 (15:54 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Wed, 21 Aug 2024 06:10:37 +0000 (15:10 +0900)
Requests asynchronous rendering of text with a fixed size.

Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs

index 7f6f6757f1d527926acc68a942e892bb2592df51..cc53e8d8c66a1c77374a5f1686188898faa444ef 100755 (executable)
@@ -192,6 +192,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_CUTOUT_get")]
             public static extern int CutoutGet();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_RequestAsyncRenderWithFixedSize")]
+            public static extern void RequestAsyncRenderWithFixedSize(global::System.Runtime.InteropServices.HandleRef textLabelRef, float width, float height);
         }
     }
 }
index 8a86f8c2287b600f20f7531d5eeba485f54ee08c..a9f077028e6d12ee6fcd840b3a7f2e31c042273d 100755 (executable)
@@ -320,6 +320,21 @@ namespace Tizen.NUI.BaseComponents
             return ThemeManager.GetStyle(this.GetType()) == null ? false : true;
         }
 
+        /// <summary>
+        /// Requests asynchronous rendering of text with a fixed size.
+        /// </summary>
+        /// <param name="width">The width of text to render.</param>
+        /// <param name="height">The height of text to render.</param>
+        /// <remarks>
+        /// Only works when AsyncLoad is true.
+        /// </remarks>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void RequestAsyncRenderWithFixedSize(float width, float height)
+        {
+            Interop.TextLabel.RequestAsyncRenderWithFixedSize(SwigCPtr, width, height);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
         /// <summary>
         /// The TranslatableText property.<br />
         /// The text can set the SID value.<br />