[NUI] Revert patch about StyleManager (#1970)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Rectangle.cs
index 5d992a5..372f623 100755 (executable)
@@ -48,6 +48,10 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        internal Rectangle(Rectangle other) : this(other.x, other.y, other.width, other.height)
+        {
+        }
+
         internal Rectangle(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
         }
@@ -66,6 +70,17 @@ namespace Tizen.NUI
         {
         }
 
+        /// <summary>
+        /// The type cast operator, int to Rectangle.
+        /// </summary>
+        /// <param name="value">A value of int type.</param>
+        /// <returns>return a Extents instance</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static implicit operator Rectangle(int value)
+        {
+            return new Rectangle(value, value, value, value);
+        }
+
         internal delegate void RectangleChangedCallback(int x, int y, int width, int height);
         private RectangleChangedCallback callback = null;