Add InheritOpacity API to View as a simplified way of using Dali COLOR_MODE 04/150804/5
authorTom Robinson <tom.robinson@samsung.com>
Mon, 18 Sep 2017 17:40:51 +0000 (18:40 +0100)
committerTom Robinson <tom.robinson@samsung.com>
Tue, 19 Sep 2017 13:46:43 +0000 (13:46 +0000)
Change-Id: If1676ea7682b0d8f3ad327ab795634c5a6c23266

Tizen.NUI/src/public/BaseComponents/View.cs

index 6ae6886..b269e05 100755 (executable)
@@ -3389,6 +3389,22 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Gets/Sets the Opacity inheritance state. If true (default) This view will blend its opacity with the parents.
+        /// If false, this view will use its own opacity value directly.
+        /// </summary>
+        public bool InheritOpacity
+        {
+            get
+            {
+                return GetColorMode() != ColorMode.UseOwnColor;
+            }
+            set
+            {
+                SetColorMode(value ? ColorMode.UseOwnMultiplyParentAlpha : ColorMode.UseOwnColor);
+            }
+        }
+
+        /// <summary>
         /// Gets/Sets the status of how the view and its children should be drawn.<br>
         /// Not all views are renderable, but DrawMode can be inherited from any view.<br>
         /// If an object is in a 3D layer, it will be depth-tested against other objects in the world i.e. it may be obscured if other objects are in front.<br>