--- /dev/null
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class MaskEffect
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MaskEffect_New__SWIG_0")]
+ public static extern global::System.IntPtr New(global::System.Runtime.InteropServices.HandleRef control);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MaskEffect_New__SWIG_1")]
+ public static extern global::System.IntPtr New(global::System.Runtime.InteropServices.HandleRef control, MaskEffectMode maskMode, float positionX, float positionY, float scaleX, float scaleY);
+ }
+ }
+}
*/
using System.ComponentModel;
using System;
+using Tizen.NUI.BaseComponents;
namespace Tizen.NUI
{
+ /// <summary>
+ /// Enumeration for selecting how the mask source interprets pixel data
+ /// Alpha: Uses the alpha channel of the mask texture. (Default)
+ /// Luminance: Converts RGB to grayscale and uses the luminance as mask value.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum MaskEffectMode
+ {
+ Alpha = 0,
+ Luminance,
+ }
+
/// <summary>
/// View's optional render effect.
/// Applications can apply RenderEffect as the example below :
{
return new BackgroundBlurEffect(Interop.BackgroundBlurEffect.New((uint)Math.Round(blurRadius, 0)));
}
+
+ /// <summary>
+ /// Create a mask effect
+ /// </summary>
+ /// <remarks>
+ /// Created RenderEffect is immutable.
+ /// </remarks>
+ /// <param name="control">The mask source control.</param>
+ /// <returns>mask effect with given control.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static RenderEffect CreateMaskEffect(View control)
+ {
+ return new RenderEffect(Interop.MaskEffect.New(control.SwigCPtr));
+ }
+
+ /// <summary>
+ /// Create a mask effect
+ /// </summary>
+ /// <remarks>
+ /// Created RenderEffect is immutable.
+ /// </remarks>
+ /// <param name="control">The mask source control.</param>
+ /// <param name="maskMode">Defines pixel data type (alpha, luminance) used as the mask source.</param>
+ /// <param name="positionX">The X Position of mask source.</param>
+ /// <param name="positionY">The Y Position of mask source.</param>
+ /// <param name="scaleX">The X Scale of mask source.</param>
+ /// <param name="scaleY">The Y Scale of mask source.</param>
+ /// <returns>mask effect with given control.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static RenderEffect CreateMaskEffect(View control, MaskEffectMode maskMode, float positionX = 0.0f, float positionY = 0.0f, float scaleX = 1.0f, float scaleY = 1.0f)
+ {
+ return new RenderEffect(Interop.MaskEffect.New(control.SwigCPtr, maskMode, positionX, positionY, scaleX, scaleY));
+ }
}
}