Add GenerateUrl API to FrameBuffer
authorJiyun Yang <ji.yang@samsung.com>
Thu, 27 Apr 2023 11:09:35 +0000 (20:09 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Fri, 28 Apr 2023 07:17:25 +0000 (16:17 +0900)
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/internal/Common/FrameBuffer.cs
src/Tizen.NUI/src/internal/Interop/Interop.FrameBuffer.cs

index 433b006..dc8ee22 100755 (executable)
@@ -72,5 +72,16 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
+
+        /// <summary>
+        /// Generate URI from current buffer.
+        /// </summary>
+        /// <param name="pixelFormat">The pixel format for this frame buffer</param>
+        /// <param name="width">The width for this frame buffer</param>
+        /// <param name="height">The height for this frame buffer</param>
+        public ImageUrl GenerateUrl(PixelFormat pixelFormat, int width, int height)
+        {
+            return new ImageUrl(Interop.FrameBuffer.GenerateUrl(this.SwigCPtr.Handle, (int)pixelFormat, width, height), true);
+        }
     }
 }
index adf3f74..607b19d 100755 (executable)
@@ -56,6 +56,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_FrameBuffer_SWIGUpcast")]
             public static extern global::System.IntPtr Upcast(global::System.IntPtr jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_FrameBuffer_GenerateUrl")]
+            public static extern global::System.IntPtr GenerateUrl(global::System.IntPtr frameBuffer, int pixelFormat, int width, int height);
         }
     }
 }