Added AlphaMaskURL property to ImageVisualMap 05/133305/1
authorDavid Steele <david.steele@samsung.com>
Fri, 9 Jun 2017 12:33:17 +0000 (13:33 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 9 Jun 2017 12:33:17 +0000 (13:33 +0100)
Change-Id: Ifa296a0298d7f650c6f9b8fefb5a34cf804f9f43

Tizen.NUI/src/internal/NDalic.cs
Tizen.NUI/src/internal/NDalicPINVOKE.cs
Tizen.NUI/src/public/NUIConstants.cs
Tizen.NUI/src/public/VisualMaps.cs

index d74ddbd..4f9fa59 100755 (executable)
@@ -906,6 +906,7 @@ namespace Tizen.NUI
         internal static readonly int GRADIENT_VISUAL_SPREAD_METHOD = NDalicPINVOKE.GRADIENT_VISUAL_SPREAD_METHOD_get();
 
         internal static readonly int IMAGE_VISUAL_URL = NDalicPINVOKE.IMAGE_VISUAL_URL_get();
+        internal static readonly int IMAGE_VISUAL_ALPHA_MASK_URL = NDalicPINVOKE.IMAGE_VISUAL_ALPHA_MASK_URL_get();
         internal static readonly int IMAGE_VISUAL_FITTING_MODE = NDalicPINVOKE.IMAGE_VISUAL_FITTING_MODE_get();
         internal static readonly int IMAGE_VISUAL_SAMPLING_MODE = NDalicPINVOKE.IMAGE_VISUAL_SAMPLING_MODE_get();
         internal static readonly int IMAGE_VISUAL_DESIRED_WIDTH = NDalicPINVOKE.IMAGE_VISUAL_DESIRED_WIDTH_get();
index 91c6eea..d38a44e 100755 (executable)
@@ -37,14 +37,14 @@ class NDalicPINVOKE {
     public static extern void SWIGRegisterExceptionCallbacks_NDalic(
                                 ExceptionDelegate applicationDelegate,
                                 ExceptionDelegate arithmeticDelegate,
-                                ExceptionDelegate divideByZeroDelegate, 
-                                ExceptionDelegate indexOutOfRangeDelegate, 
+                                ExceptionDelegate divideByZeroDelegate,
+                                ExceptionDelegate indexOutOfRangeDelegate,
                                 ExceptionDelegate invalidCastDelegate,
                                 ExceptionDelegate invalidOperationDelegate,
                                 ExceptionDelegate ioDelegate,
                                 ExceptionDelegate nullReferenceDelegate,
-                                ExceptionDelegate outOfMemoryDelegate, 
-                                ExceptionDelegate overflowDelegate, 
+                                ExceptionDelegate outOfMemoryDelegate,
+                                ExceptionDelegate overflowDelegate,
                                 ExceptionDelegate systemExceptionDelegate);
 
     [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_NDalic")]
@@ -136,7 +136,7 @@ class NDalicPINVOKE {
           if (pendingException != null)
             pending = true;
         return pending;
-      } 
+      }
     }
 
     public static void Set(global::System.Exception e) {
@@ -6505,6 +6505,9 @@ class NDalicPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IMAGE_VISUAL_URL_get")]
   public static extern int IMAGE_VISUAL_URL_get();
 
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IMAGE_VISUAL_ALPHA_MASK_URL_get")]
+  public static extern int IMAGE_VISUAL_ALPHA_MASK_URL_get();
+
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IMAGE_VISUAL_FITTING_MODE_get")]
   public static extern int IMAGE_VISUAL_FITTING_MODE_get();
 
index 06f67a9..8b25bcd 100755 (executable)
@@ -811,6 +811,7 @@ namespace Tizen.NUI
     public struct ImageVisualProperty
     {
         public static readonly int URL = NDalic.IMAGE_VISUAL_URL;
+        public static readonly int AlphaMaskURL = NDalic.IMAGE_VISUAL_ALPHA_MASK_URL;
         public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE;
         public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE;
         public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH;
@@ -1360,8 +1361,8 @@ namespace Tizen.NUI
     }
 
     public enum DisposeTypes
-    {              
-        Explicit,   //Called By User 
+    {
+        Explicit,   //Called By User
         Implicit,   //Called by DisposeQueue
     }
 }
index dee7c61..2991aef 100755 (executable)
@@ -561,6 +561,7 @@ namespace Tizen.NUI
         }
 
         private string _url = null;
+        private string _alphaMaskUrl = null;
         private FittingModeType? _fittingMode = null;
         private SamplingModeType? _samplingMode = null;
         private int? _desiredWidth = null;
@@ -589,6 +590,23 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Get or set the URL of the alpha mask.<br>
+        /// Optional.
+        /// </summary>
+        public string AlphaMaskURL
+        {
+            get
+            {
+                return _alphaMaskUrl;
+            }
+            set
+            {
+                _alphaMaskUrl = value;
+                UpdateVisual();
+            }
+        }
+
+        /// <summary>
         /// Get or set fitting options, used when resizing images to fit desired dimensions.<br>
         /// If not supplied, default is FittingModeType.ShrinkToFit.<br>
         /// For Normal Quad images only.<br>
@@ -771,6 +789,7 @@ namespace Tizen.NUI
                 _outputVisualMap = new PropertyMap();
                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
                 _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url));
+                if (_alphaMaskUrl != null ) { _outputVisualMap.Add(ImageVisualProperty.AlphaMaskURL, new PropertyValue(_alphaMaskUrl)); }
                 if (_fittingMode != null) { _outputVisualMap.Add(ImageVisualProperty.FittingMode, new PropertyValue((int)_fittingMode)); }
                 if (_samplingMode != null) { _outputVisualMap.Add(ImageVisualProperty.SamplingMode, new PropertyValue((int)_samplingMode)); }
                 if (_desiredWidth != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredWidth, new PropertyValue((int)_desiredWidth)); }