[NUI] Add GetBrightness()
authorJoogab Yun <joogab.yun@samsung.com>
Mon, 26 Jul 2021 01:49:07 +0000 (10:49 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 26 Jul 2021 06:49:17 +0000 (15:49 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.PixelBuffer.cs
src/Tizen.NUI/src/public/PixelBuffer.cs

index 5b3ba30..3762de5 100755 (executable)
@@ -66,6 +66,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_PixelBuffer_Rotate")]
             public static extern bool PixelBuffer_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);
         }
     }
 }
\ No newline at end of file
index 83a3b26..a6686ba 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;