From 3b8357476cf456e29edebd3e94baba583b382d8b Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 9 Jun 2017 13:33:17 +0100 Subject: Added AlphaMaskURL property to ImageVisualMap Change-Id: Ifa296a0298d7f650c6f9b8fefb5a34cf804f9f43 --- Tizen.NUI/src/internal/NDalic.cs | 1 + Tizen.NUI/src/internal/NDalicPINVOKE.cs | 13 ++++++++----- Tizen.NUI/src/public/NUIConstants.cs | 5 +++-- Tizen.NUI/src/public/VisualMaps.cs | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Tizen.NUI/src/internal/NDalic.cs b/Tizen.NUI/src/internal/NDalic.cs index d74ddbd..4f9fa59 100755 --- a/Tizen.NUI/src/internal/NDalic.cs +++ b/Tizen.NUI/src/internal/NDalic.cs @@ -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(); diff --git a/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/Tizen.NUI/src/internal/NDalicPINVOKE.cs index 91c6eea..d38a44e 100755 --- a/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -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(); diff --git a/Tizen.NUI/src/public/NUIConstants.cs b/Tizen.NUI/src/public/NUIConstants.cs index 06f67a9..8b25bcd 100755 --- a/Tizen.NUI/src/public/NUIConstants.cs +++ b/Tizen.NUI/src/public/NUIConstants.cs @@ -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 } } diff --git a/Tizen.NUI/src/public/VisualMaps.cs b/Tizen.NUI/src/public/VisualMaps.cs index dee7c61..2991aef 100755 --- a/Tizen.NUI/src/public/VisualMaps.cs +++ b/Tizen.NUI/src/public/VisualMaps.cs @@ -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; @@ -588,6 +589,23 @@ namespace Tizen.NUI } } + /// + /// Get or set the URL of the alpha mask.
+ /// Optional. + ///
+ public string AlphaMaskURL + { + get + { + return _alphaMaskUrl; + } + set + { + _alphaMaskUrl = value; + UpdateVisual(); + } + } + /// /// Get or set fitting options, used when resizing images to fit desired dimensions.
/// If not supplied, default is FittingModeType.ShrinkToFit.
@@ -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)); } -- cgit v1.2.3