[Tizen] Add obsolete attribute for deprecated apis, backward compatibility
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / Size2D.cs
index 9e3b50c..13006b4 100755 (executable)
@@ -361,6 +361,25 @@ namespace Tizen.NUI
             return new Size2D((int)vec.X, (int)vec.Y);
         }
 
+        /// <summary>
+        /// Type cast operator, Size2D to Uint16Pair.
+        /// </summary>
+        /// <param name="size2d">Object of Size2D type</param>
+        public static implicit operator Uint16Pair(Size2D size2d)
+        {
+            return new Uint16Pair((uint)size2d.Width, (uint)size2d.Height);
+        }
+
+        /// <summary>
+        /// Type cast operator, Uint16Pair to Size2D type.
+        /// </summary>
+        /// <param name="pair">Object of Vector2 type</param>
+        public static implicit operator Size2D(Uint16Pair pair)
+        {
+            return new Size2D((int)pair.GetWidth(), (int)pair.GetWidth());
+        }
+
+
     }
 
 }