Add GetBrightness()
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 30 Jun 2021 06:08:05 +0000 (15:08 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 19 Jul 2021 09:01:03 +0000 (18:01 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.PixelBuffer.cs
src/Tizen.NUI/src/public/Images/PixelBuffer.cs

index 8fc08b1..e5190af 100755 (executable)
@@ -80,6 +80,9 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_PixelBuffer_Rotate")]
             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool Rotate(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_PixelBuffer_GetBrightness")]
+            public static extern uint GetBrightness(global::System.Runtime.InteropServices.HandleRef jarg1);
         }
     }
 }
index 11432ad..eb9cf33 100755 (executable)
@@ -272,6 +272,17 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        ///  Gets the brightness value of the pixel buffer.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint GetBrightness()
+        {
+            uint ret = Interop.PixelBuffer.GetBrightness(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PixelBuffer obj)
         {
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;