}
/// <summary>
+ /// Enumeration for MaskingMode of image.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum MaskingModeType
+ {
+ /// <summary>
+ /// Applies alpha masking on rendering time.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ MaskingOnRendering,
+ /// <summary>
+ /// Applies alpha masking on loading time.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ MaskingOnLoading
+ }
+
+ /// <summary>
/// ImageView ResourceUrl, type string.
/// This is one of mandatory property. Even if not set or null set, it sets empty string ("") internally.
/// When it is set as null, it gives empty string ("") to be read.
}
/// <summary>
+ /// Gets or sets whether to apply mask on GPU or not.<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public MaskingModeType MaskingMode
+ {
+ get
+ {
+ return (MaskingModeType)GetValue(MaskingModeProperty);
+ }
+ set
+ {
+ SetValue(MaskingModeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private MaskingModeType InternalMaskingMode
+ {
+ get
+ {
+ int ret = (int)MaskingModeType.MaskingOnLoading;
+
+ PropertyValue maskingMode = GetCachedImageVisualProperty(ImageVisualProperty.MaskingMode);
+ maskingMode?.Get(out ret);
+ maskingMode?.Dispose();
+
+ return (MaskingModeType)ret;
+ }
+ set
+ {
+ MaskingModeType ret = value;
+ PropertyValue setValue = new PropertyValue((int)ret);
+ UpdateImage(ImageVisualProperty.MaskingMode, setValue);
+ setValue?.Dispose();
+ }
+ }
+
+ /// <summary>
/// Gets the loading state of the visual resource.
/// </summary>
/// <since_tizen> 5 </since_tizen>
}
}
-
-
/// <summary>
/// Gets or sets the desired image width.<br />
/// If not specified, the actual image width is used.<br />
}));
/// <summary>
+ /// MaskingModeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty MaskingModeProperty = BindableProperty.Create(nameof(MaskingMode), typeof(MaskingModeType), typeof(ImageView), default(MaskingModeType), propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalMaskingMode = (ImageView.MaskingModeType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalMaskingMode;
+ });
+
+ /// <summary>
/// ImageMapProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly int RedrawInScalingDown = NDalic.ImageVisualOrientationCorrection + 11;
+
+ /// <summary>
+ /// @brief Whether to apply mask on the GPU or not.
+ /// @details Name "MaskingMode", type MaskingModeType (Property::INTEGER).
+ /// @note It is used in the ImageVisual, and AnimatedImageVisual.The default is MaskingOnLoading.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int MaskingMode = NDalic.ImageVisualOrientationCorrection + 12;
}
/// <summary>