From 1a40528447cc022e2d926bb926a92c69bb6538b9 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Mon, 26 Jul 2021 10:49:07 +0900 Subject: [PATCH] [NUI] Add GetBrightness() --- .../src/internal/Interop/Interop.PixelBuffer.cs | 3 +++ src/Tizen.NUI/src/public/PixelBuffer.cs | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.PixelBuffer.cs b/src/Tizen.NUI/src/internal/Interop/Interop.PixelBuffer.cs index 5b3ba3095..3762de5fd 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.PixelBuffer.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.PixelBuffer.cs @@ -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 diff --git a/src/Tizen.NUI/src/public/PixelBuffer.cs b/src/Tizen.NUI/src/public/PixelBuffer.cs index 83a3b26a0..a6686bac7 100755 --- a/src/Tizen.NUI/src/public/PixelBuffer.cs +++ b/src/Tizen.NUI/src/public/PixelBuffer.cs @@ -272,6 +272,17 @@ namespace Tizen.NUI return ret; } + /// + /// Gets the brightness value of the pixel buffer. + /// + [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; -- 2.34.1