[NUI] refactoring GraphicsType classes and Dp. Add new Type Sp
authorEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Wed, 3 Nov 2021 04:17:25 +0000 (13:17 +0900)
committerhuiyu <35286162+huiyueun@users.noreply.github.com>
Mon, 29 Nov 2021 08:55:55 +0000 (17:55 +0900)
src/Tizen.NUI/src/public/Utility/DpTypeConverter.cs
src/Tizen.NUI/src/public/Utility/GraphicsTypeExtensions.cs
src/Tizen.NUI/src/public/Utility/GraphicsTypeManager.cs
src/Tizen.NUI/src/public/Utility/PointTypeConverter.cs
src/Tizen.NUI/src/public/Utility/SpTypeConverter.cs [new file with mode: 0755]
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/GraphicsTypeTest.cs

index d59eeef..56d65f4 100755 (executable)
@@ -30,7 +30,7 @@ namespace Tizen.NUI
         private volatile static DpTypeConverter dpTypeConverter;
 
         /// <summary>
-        /// An unique Singleton Instance of DpTypeConverter
+        /// An unique Singleton Instance of DpTypeConverter.
         /// </summary>
         /// <value>Singleton instance of DpTypeConverter</value>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
@@ -49,7 +49,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Converts script to px
+        /// Converts script to pixel.
         /// </summary>
         /// <returns>Pixel value that is converted from input string</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
@@ -80,25 +80,25 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Converts dp type to px
+        /// Converts dp type to pixel.
         /// </summary>
         /// <returns>Pixel value that is converted by the the display matric</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override float ConvertToPixel(float value)
         {
-            return value * (GraphicsTypeManager.Instance.ScaledDpi / (float)GraphicsTypeManager.Instance.BaselineDpi);
+            return value * (GraphicsTypeManager.Instance.Dpi / (float)GraphicsTypeManager.Instance.BaselineDpi);
         }
 
         /// <summary>
-        /// Converts px to dp type
+        /// Converts px to dp type.
         /// </summary>
         /// <returns>An converted value from pixel</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override float ConvertFromPixel(float value)
         {
-            return value * (GraphicsTypeManager.Instance.BaselineDpi / (float)GraphicsTypeManager.Instance.ScaledDpi);
+            return value * (GraphicsTypeManager.Instance.BaselineDpi / (float)GraphicsTypeManager.Instance.Dpi);
         }
     }
 }
index f2077e0..2b04f91 100644 (file)
@@ -4,8 +4,8 @@ namespace Tizen.NUI
 {
     /// <summary>
     /// The GraphicTypeExtensions class is graphics type converter for pixel based object.
-    /// Density independent pixel(dp) unit is our basic target type and you can get converted value by ToDp(),
-    /// and you can get original pixel by ToDp().
+    /// Density independent pixel(dp) unit is our basic target type and you can get converted value by PxToDp(),
+    /// and you can get original pixel by PxToDp().
     /// One dp is a virtual pixel unit that's roughly equal to one pixel on a medium-density(160dpi) screen.
     /// See <see cref="Tizen.NUI.GraphicsTypeManager" /> and <see cref="Tizen.NUI.GraphicsTypeConverter" /> also.
     /// </summary>
@@ -14,295 +14,502 @@ namespace Tizen.NUI
     public static class GraphicsTypeExtensions
     {
         /// <summary>
+        /// Converter float dp to pixel.
+        /// </summary>
+        /// <param name="dp">The float dp unit value to be converted pixel unit.</param>
+        /// <returns>The float pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static float DpToPx(this float dp)
+        {
+            return GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp);
+        }
+
+        /// <summary>
+        /// Converter float sp to pixel.
+        /// </summary>
+        /// <param name="sp">The float sp unit value to be converted pixel unit.</param>
+        /// <returns>The float pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static float SpToPx(this float sp)
+        {
+            return GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp);
+        }
+
+        /// <summary>
         /// Converter float pixel to dp.
-        /// 100.0f.ToDp() = 50.0f in 320dpi display.
         /// </summary>
         /// <param name="pixel">The float pixel unit value to be converted dp unit.</param>
         /// <returns>The float dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static float ToDp(this float pixel)
+        public static float PxToDp(this float pixel)
         {
-            return GraphicsTypeManager.Instance.ConvertFromPixel(pixel);
+            return GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel);
         }
 
         /// <summary>
-        /// Converter float dp to pixel.
-        /// 100.0f.ToPixel() = 200.0f in 320dpi display.
+        /// Converter float pixel to sp.
         /// </summary>
-        /// <param name="dp">The float dp unit value to be converted pixel unit.</param>
-        /// <returns>The float pixel unit value.</returns>
+        /// <param name="pixel">The float pixel unit value to be converted sp unit.</param>
+        /// <returns>The float sp unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static float PxToSp(this float pixel)
+        {
+            return GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel);
+        }
+
+        /// <summary>
+        /// Converter int dp to pixel.
+        /// </summary>
+        /// <param name="dp">The int dp unit value to be converted pixel unit.</param>
+        /// <returns>The int pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static int DpToPx(this int dp)
+        {
+            return (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp);
+        }
+
+        /// <summary>
+        /// Converter int dp to pixel.
+        /// </summary>
+        /// <param name="sp">The int sp unit value to be converted pixel unit.</param>
+        /// <returns>The int pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static float ToPixel(this float dp)
+        public static int SpToPx(this int sp)
         {
-            return GraphicsTypeManager.Instance.ConvertToPixel(dp);
+            return (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp);
         }
 
         /// <summary>
         /// Converter int pixel to dp.
-        /// 100.ToDp() = 50 in 320dpi display.
         /// </summary>
         /// <param name="pixel">The int pixel unit value to be converted dp unit.</param>
         /// <returns>The int dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static int ToDp(this int pixel)
+        public static int PxToDp(this int pixel)
         {
-            return (int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel);
+            return (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel);
         }
 
         /// <summary>
-        /// Converter int dp to pixel.
-        /// 100.ToPixel() = 200 in 320dpi display.
+        /// Converter int pixel to sp.
         /// </summary>
-        /// <param name="dp">The int dp unit value to be converted pixel unit.</param>
-        /// <returns>The int pixel unit value.</returns>
+        /// <param name="pixel">The int pixel unit value to be converted sp unit.</param>
+        /// <returns>The int sp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static int ToPixel(this int dp)
+        public static int PxToSp(this int pixel)
         {
-            return (int)GraphicsTypeManager.Instance.ConvertToPixel(dp);
+            return (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel);
         }
 
+
         /// <summary>
         /// Converter Size pixel to dp.
-        /// Size(100.0f, 100.0f).ToDp() = Size(50.0f, 50.0f) in 320dpi display.
         /// </summary>
         /// <param name="pixel">The Size pixel unit value to be converted dp unit.</param>
         /// <returns>The Size dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Size ToDp(this Size pixel)
+        public static Size PxToDp(this Size pixel)
         {
             if (pixel == null) return null;
-            return new Size(GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Width),
-                            GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Height));
+            return new Size(GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Width),
+                            GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Height));
+        }
+
+        /// <summary>
+        /// Converter Size pixel to sp.
+        /// </summary>
+        /// <param name="pixel">The Size pixel unit value to be converted sp unit.</param>
+        /// <returns>The Size sp unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size PxToSp(this Size pixel)
+        {
+            if (pixel == null) return null;
+            return new Size(GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Width),
+                            GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Height));
         }
 
         /// <summary>
         /// Converter Size dp to pixel.
-        /// Size(100.0f, 100.0f).ToPixel() = Size(200.0f, 200.0f) in 320dpi display.
         /// </summary>
         /// <param name="dp">The Size dp unit value to be converted pixel unit.</param>
         /// <returns>The Size pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Size ToPixel(this Size dp)
+        public static Size DpToPx(this Size dp)
         {
             if (dp == null) return null;
-            return new Size(GraphicsTypeManager.Instance.ConvertToPixel(dp.Width),
-                            GraphicsTypeManager.Instance.ConvertToPixel(dp.Height));
+            return new Size(GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Width),
+                            GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Height));
+        }
+
+        /// <summary>
+        /// Converter Size sp to pixel.
+        /// </summary>
+        /// <param name="sp">The Size sp unit value to be converted pixel unit.</param>
+        /// <returns>The Size pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size SpToPx(this Size sp)
+        {
+            if (sp == null) return null;
+            return new Size(GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Width),
+                            GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Height));
         }
 
         /// <summary>
         /// Converter Size2D pixel to dp.
-        /// Size2D(100, 100).ToDp() = Size2D(50, 50) in 320dpi display.
         /// </summary>
         /// <param name="pixel">The Size2D pixel unit value to be converted dp unit.</param>
         /// <returns>The Size2D dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Size2D ToDp(this Size2D pixel)
+        public static Size2D PxToDp(this Size2D pixel)
         {
             if (pixel == null) return null;
-            return new Size2D((int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Width),
-                              (int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Height));
+            return new Size2D((int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Width),
+                              (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Height));
+        }
+
+        /// <summary>
+        /// Converter Size2D pixel to sp.
+        /// </summary>
+        /// <param name="pixel">The Size2D pixel unit value to be converted sp unit.</param>
+        /// <returns>The Size2D sp unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size2D PxToSp(this Size2D pixel)
+        {
+            if (pixel == null) return null;
+            return new Size2D((int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Width),
+                              (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Height));
         }
 
         /// <summary>
         /// Converter Size2D dp to pixel.
-        /// Size2D(100, 100).ToPixel() = Size(200, 200) in 320dpi display.
         /// </summary>
         /// <param name="dp">The Size2D dp unit value to be converted pixel unit.</param>
         /// <returns>The Size2D pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Size2D ToPixel(this Size2D dp)
+        public static Size2D DpToPx(this Size2D dp)
         {
             if (dp == null) return null;
-            return new Size2D((int)GraphicsTypeManager.Instance.ConvertToPixel(dp.Width),
-                              (int)GraphicsTypeManager.Instance.ConvertToPixel(dp.Height));
+            return new Size2D((int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Width),
+                              (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Height));
+        }
+
+        /// <summary>
+        /// Converter Size2D sp to pixel.
+        /// </summary>
+        /// <param name="sp">The Size2D sp unit value to be converted pixel unit.</param>
+        /// <returns>The Size2D pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size2D SpToPx(this Size2D sp)
+        {
+            if (sp == null) return null;
+            return new Size2D((int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Width),
+                              (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Height));
         }
 
         /// <summary>
         /// Converter Position pixel to dp.
-        /// Position(100.0f, 100.0f).ToDp() = Position(50.0f, 50.0f) in 320dpi display.
         /// </summary>
         /// <param name="pixel">The Position pixel unit value to be converted dp unit.</param>
         /// <returns>The Position dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Position ToDp(this Position pixel)
+        public static Position PxToDp(this Position pixel)
+        {
+            if (pixel == null) return null;
+            return new Position(GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.X),
+                                GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Y));
+        }
+
+        /// <summary>
+        /// Converter Position pixel to sp.
+        /// </summary>
+        /// <param name="pixel">The Position pixel unit value to be converted sp unit.</param>
+        /// <returns>The Position sp unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Position PxToSp(this Position pixel)
         {
             if (pixel == null) return null;
-            return new Position(GraphicsTypeManager.Instance.ConvertFromPixel(pixel.X),
-                                GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Y));
+            return new Position(GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.X),
+                                GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Y));
         }
 
         /// <summary>
         /// Converter Position dp to pixel.
-        /// Position(100.0f, 100.0f).ToPixel() = Position(200.0f, 200.0f) in 320dpi display.
         /// </summary>
         /// <param name="dp">The Position dp unit value to be converted pixel unit.</param>
         /// <returns>The Position pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Position ToPixel(this Position dp)
+        public static Position DpToPx(this Position dp)
         {
             if (dp == null) return null;
-            return new Position(GraphicsTypeManager.Instance.ConvertToPixel(dp.X),
-                                GraphicsTypeManager.Instance.ConvertToPixel(dp.Y));
+            return new Position(GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.X),
+                                GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Y));
+        }
+
+        /// <summary>
+        /// Converter Position sp to pixel.
+        /// </summary>
+        /// <param name="sp">The Position sp unit value to be converted pixel unit.</param>
+        /// <returns>The Position pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Position SpToPx(this Position sp)
+        {
+            if (sp == null) return null;
+            return new Position(GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.X),
+                                GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Y));
         }
 
         /// <summary>
         /// Converter Position2D pixel to dp.
-        /// Position2D(100.0f, 100.0f).ToDp() = Position2D(50.0f, 50.0f) in 320dpi display.
         /// </summary>
         /// <param name="pixel">The Position2D pixel unit value to be converted dp unit.</param>
         /// <returns>The Position2D dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Position2D ToDp(this Position2D pixel)
+        public static Position2D PxToDp(this Position2D pixel)
         {
             if (pixel == null) return null;
-            return new Position2D((int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.X),
-                                  (int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Y));
+            return new Position2D((int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.X),
+                                  (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Y));
+        }
+
+        /// <summary>
+        /// Converter Position2D pixel to sp.
+        /// </summary>
+        /// <param name="pixel">The Position2D pixel unit value to be converted sp unit.</param>
+        /// <returns>The Position2D sp unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Position2D PxToSp(this Position2D pixel)
+        {
+            if (pixel == null) return null;
+            return new Position2D((int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.X),
+                                  (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Y));
         }
 
         /// <summary>
         /// Converter Position2D dp to pixel.
-        /// Position2D(100, 100).ToPixel() = Position2D(200, 200) in 320dpi display.
         /// </summary>
         /// <param name="dp">The Position2D dp unit value to be converted pixel unit.</param>
         /// <returns>The Position2D pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Position2D ToPixel(this Position2D dp)
+        public static Position2D DpToPx(this Position2D dp)
         {
             if (dp == null) return null;
-            return new Position2D((int)GraphicsTypeManager.Instance.ConvertToPixel(dp.X),
-                                  (int)GraphicsTypeManager.Instance.ConvertToPixel(dp.Y));
+            return new Position2D((int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.X),
+                                  (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Y));
+        }
+
+        /// <summary>
+        /// Converter Position2D sp to pixel.
+        /// </summary>
+        /// <param name="sp">The Position2D sp unit value to be converted pixel unit.</param>
+        /// <returns>The Position2D pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Position2D SpToPx(this Position2D sp)
+        {
+            if (sp == null) return null;
+            return new Position2D((int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.X),
+                                  (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Y));
         }
 
         /// <summary>
         /// Converter Rectangle pixel to dp.
-        /// Rectangle(100, 100, 100, 100).ToDp() = Rectangle(50, 50, 50, 50) in 320dpi display.
         /// </summary>
         /// <param name="pixel">The Rectangle pixel unit value to be converted dp unit.</param>
         /// <returns>The Rectangle dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Rectangle ToDp(this Rectangle pixel)
+        public static Rectangle PxToDp(this Rectangle pixel)
+        {
+            if (pixel == null) return null;
+            return new Rectangle((int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.X),
+                                 (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Y),
+                                 (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Width),
+                                 (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Height));
+        }
+
+        /// <summary>
+        /// Converter Rectangle pixel to sp.
+        /// </summary>
+        /// <param name="pixel">The Rectangle pixel unit value to be converted sp unit.</param>
+        /// <returns>The Rectangle sp unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Rectangle PxToSp(this Rectangle pixel)
         {
             if (pixel == null) return null;
-            return new Rectangle((int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.X),
-                                 (int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Y),
-                                 (int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Width),
-                                 (int)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Height));
+            return new Rectangle((int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.X),
+                                 (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Y),
+                                 (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Width),
+                                 (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Height));
         }
 
         /// <summary>
         /// Converter Rectangle dp to pixel.
-        /// Rectangle(100, 100, 100, 100).ToPixel() = Rectangle(200, 200, 200, 200) in 320dpi display.
         /// </summary>
         /// <param name="dp">The Rectangle dp unit value to be converted pixel unit.</param>
         /// <returns>The Rectangle pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Rectangle ToPixel(this Rectangle dp)
+        public static Rectangle DpToPx(this Rectangle dp)
         {
             if (dp == null) return null;
-            return new Rectangle((int)GraphicsTypeManager.Instance.ConvertToPixel(dp.X),
-                                 (int)GraphicsTypeManager.Instance.ConvertToPixel(dp.Y),
-                                 (int)GraphicsTypeManager.Instance.ConvertToPixel(dp.Width),
-                                 (int)GraphicsTypeManager.Instance.ConvertToPixel(dp.Height));
+            return new Rectangle((int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.X),
+                                 (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Y),
+                                 (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Width),
+                                 (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Height));
+        }
+
+        /// <summary>
+        /// Converter Rectangle sp to pixel.
+        /// </summary>
+        /// <param name="sp">The Rectangle sp unit value to be converted pixel unit.</param>
+        /// <returns>The Rectangle pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Rectangle SpToPx(this Rectangle sp)
+        {
+            if (sp == null) return null;
+            return new Rectangle((int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.X),
+                                 (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Y),
+                                 (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Width),
+                                 (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Height));
         }
 
         /// <summary>
         /// Converter Extents pixel to dp.
-        /// Extents(2, 2, 2, 2).ToDp() = Extents(1, 1, 1, 1) in 320dpi display.
         /// </summary>
         /// <param name="pixel">The Extents pixel unit value to be converted dp unit.</param>
         /// <returns>The Extents dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Extents ToDp(this Extents pixel)
+        public static Extents PxToDp(this Extents pixel)
+        {
+            if (pixel == null) return null;
+            return new Extents((ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Start),
+                               (ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.End),
+                               (ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Top),
+                               (ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Bottom));
+        }
+
+        /// <summary>
+        /// Converter Extents pixel to sp.
+        /// </summary>
+        /// <param name="pixel">The Extents pixel unit value to be converted sp unit.</param>
+        /// <returns>The Extents sp unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Extents PxToSp(this Extents pixel)
         {
             if (pixel == null) return null;
-            return new Extents((ushort)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Start),
-                               (ushort)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.End),
-                               (ushort)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Top),
-                               (ushort)GraphicsTypeManager.Instance.ConvertFromPixel(pixel.Bottom));
+            return new Extents((ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Start),
+                               (ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.End),
+                               (ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Top),
+                               (ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Bottom));
         }
 
         /// <summary>
         /// Converter Extents dp to pixel.
-        /// Extents(2, 2, 2, 2).ToPixel() = Extents(4, 4, 4, 4) in 320dpi display.
         /// </summary>
         /// <param name="dp">The Extents dp unit value to be converted pixel unit.</param>
         /// <returns>The Extents pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static Extents ToPixel(this Extents dp)
+        public static Extents DpToPx(this Extents dp)
         {
             if (dp == null) return null;
-            return new Extents((ushort)GraphicsTypeManager.Instance.ConvertToPixel(dp.Start),
-                               (ushort)GraphicsTypeManager.Instance.ConvertToPixel(dp.End),
-                               (ushort)GraphicsTypeManager.Instance.ConvertToPixel(dp.Top),
-                               (ushort)GraphicsTypeManager.Instance.ConvertToPixel(dp.Bottom));
+            return new Extents((ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Start),
+                               (ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.End),
+                               (ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Top),
+                               (ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Bottom));
+        }
+
+        /// <summary>
+        /// Converter Extents sp to pixel.
+        /// </summary>
+        /// <param name="sp">The Extents sp unit value to be converted pixel unit.</param>
+        /// <returns>The Extents pixel unit value.</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Extents SpToPx(this Extents sp)
+        {
+            if (sp == null) return null;
+            return new Extents((ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Start),
+                               (ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.End),
+                               (ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Top),
+                               (ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Bottom));
         }
 
         /// <summary>
         /// Converter float font pixel size to point size.
-        /// 100.0f.PixelToPoint() = 50.0f in 144dpi display.
         /// </summary>
         /// <param name="pixel">The float pixel unit value to be converted point unit.</param>
         /// <returns>The float point unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static float PixelToPoint(this float pixel)
+        public static float PxToPt(this float pixel)
         {
-            return GraphicsTypeManager.Instance.ConvertFromPixel(pixel);
+            return GraphicsTypeManager.Instance.Point.ConvertFromPixel(pixel);
         }
 
         /// <summary>
         /// Converter float font point size to pixel size.
-        /// 100.0f.PointToPixel() = 200.0f in 144dpi display.
         /// </summary>
-        /// <param name="point">The float point unit value to be converted pixel unit.</param>
+        /// <param name="pt">The float point unit value to be converted pixel unit.</param>
         /// <returns>The float pixel unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static float PointToPixel(this float point)
+        public static float PtToPixel(this float pt)
         {
-            return PointTypeConverter.Instance.ConvertToPixel(point);
+            return GraphicsTypeManager.Instance.Point.ConvertToPixel(pt);
         }
 
         /// <summary>
         /// Converter float font dp size to point size.
-        /// 16.0f.DpToPoint() = 7.2f.
+        /// 16.0f.DpToPt() = 7.2f.
         /// </summary>
         /// <param name="dp">The float dp unit value to be converted point unit.</param>
         /// <returns>The float point unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static float DpToPoint(this float dp)
+        public static float DpToPt(this float dp)
         {
-            return PointTypeConverter.Instance.ConvertDpToPoint(dp);
+            return GraphicsTypeManager.Instance.Point.ConvertDpToPoint(dp);
         }
 
         /// <summary>
         /// Converter float font point size to dp size.
-        /// 7.2f.PointToDp() = 16.0f.
+        /// 7.2f.PtToDp() = 16.0f.
         /// </summary>
-        /// <param name="point">The float point unit value to be converted dp unit.</param>
+        /// <param name="pt">The float point unit value to be converted dp unit.</param>
         /// <returns>The float dp unit value.</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public static float PointToDp(this float point)
+        public static float PtToDp(this float pt)
         {
-            return PointTypeConverter.Instance.ConvertPointToDp(point);
+            return GraphicsTypeManager.Instance.Point.ConvertPointToDp(pt);
         }
     }
 }
index 51b7b77..4fbcb55 100755 (executable)
@@ -29,7 +29,9 @@ namespace Tizen.NUI
     public class GraphicsTypeManager
     {
         private volatile static GraphicsTypeManager graphicsTypeManager;
-        private GraphicsTypeConverter typeConverter;
+        private DpTypeConverter dp;
+        private SpTypeConverter sp;
+        private PointTypeConverter pt;
         private float scalingFactor = 1.0f;
         private int baselineDpi = DensityMedium;
 
@@ -77,7 +79,7 @@ namespace Tizen.NUI
 
         /// <summary>
         /// Custom scale factor of display metrics.
-        /// ScalingFactor scale Dpi on DpiStable.
+        /// ScalingFactor scale ScaledDpi on Dpi.
         /// </summary>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -107,8 +109,8 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Dpi for GraphicsTypeManager.
-        /// Dpi is scaled from Dpi with custom ScalingFactor.
+        /// Scaled Dpi for GraphicsTypeManager.
+        /// ScaledDpi is scaled from Dpi with custom ScalingFactor.
         /// </summary>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -141,6 +143,16 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public float Density
         {
+            get => ((float)Dpi / (float)BaselineDpi);
+        }
+
+        /// <summary>
+        /// Scaled Density of display.
+        /// </summary>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public float ScaledDensity
+        {
             get => ((float)ScaledDpi / (float)BaselineDpi);
         }
 
@@ -164,21 +176,58 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// GraphicsTypeConverter that manager internally use for type converting.
-        /// Default TypeConverter is DpTypeConverter.
-        /// See <see cref="Tizen.NUI.GraphicsTypeConverter" /> and <see cref="Tizen.NUI.DpTypeConverter" />.
+        /// Default DpTypeConverter. use this Converter to convert Dp to/from other types.
+        /// See <see cref="Tizen.NUI.DpTypeConverter" />.
+        /// </summary>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public DpTypeConverter Dp
+        {
+            get
+            {
+                return dp;
+            }
+            set
+            {
+                dp = value;
+            }
+        }
+
+
+        /// <summary>
+        /// Default SpTypeConverter. use this Converter to convert Sp to/from other types.
+        /// See <see cref="Tizen.NUI.SpTypeConverter" />.
+        /// </summary>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public SpTypeConverter Sp
+        {
+            get
+            {
+                return sp;
+            }
+            set
+            {
+                sp = value;
+            }
+        }
+
+
+        /// <summary>
+        /// Default PointTypeConverter. use this Converter to convert Point to/from other types.
+        /// See <see cref="Tizen.NUI.PointTypeConverter" />.
         /// </summary>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public GraphicsTypeConverter TypeConverter
+        public PointTypeConverter Point
         {
             get
             {
-                return typeConverter;
+                return pt;
             }
             set
             {
-                typeConverter = value;
+                pt = value;
             }
         }
 
@@ -190,7 +239,9 @@ namespace Tizen.NUI
         private GraphicsTypeManager()
         {
             // Get default type converter
-            typeConverter = DpTypeConverter.Instance;
+            dp = DpTypeConverter.Instance;
+            sp = SpTypeConverter.Instance;
+            pt = PointTypeConverter.Instance;
 
             // Get ScalingFactor.
             // FIXME: We need to get ScalingFactor from System.Information model-config firstly.
@@ -206,37 +257,44 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Converts script to px
+        /// Converts script to pixel.
         /// </summary>
         /// <returns>Pixel value that is converted from input string</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public float ConvertScriptToPixel(string scriptValue)
         {
-            return typeConverter.ConvertScriptToPixel(scriptValue);
-        }
-
-        /// <summary>
-        /// Converts other type to px
-        /// </summary>
-        /// <returns>Pixel value that is converted by the the display matric</returns>
-        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual float ConvertToPixel(float value)
-        {
-            return typeConverter.ConvertToPixel(value);
+            float convertedValue = 0;
+            if (scriptValue != null)
+            {
+                if (scriptValue.EndsWith("dp"))
+                {
+                    convertedValue = Dp.ConvertScriptToPixel(scriptValue);
+                }
+                else if (scriptValue.EndsWith("sp"))
+                {
+                    convertedValue = Sp.ConvertScriptToPixel(scriptValue);
+                }
+                else if (scriptValue.EndsWith("pt"))
+                {
+                    convertedValue = Point.ConvertScriptToPixel(scriptValue);
+                }
+                else if (scriptValue.EndsWith("px"))
+                {
+                    convertedValue = float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("px")), CultureInfo.InvariantCulture);
+                }
+                else
+                {
+                    if (!float.TryParse(scriptValue, NumberStyles.Any, CultureInfo.InvariantCulture, out convertedValue))
+                    {
+                        NUILog.Error("Cannot convert the script {scriptValue}\n");
+                        convertedValue = 0;
+                    }
+                }
+            }
+            return convertedValue;
         }
 
-        /// <summary>
-        /// Converts px to other type
-        /// </summary>
-        /// <returns>An converted value from pixel</returns>
-        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual float ConvertFromPixel(float value)
-        {
-            return typeConverter.ConvertFromPixel(value);
-        }
 
         internal void RegisterCustomConverterForDynamicResourceBinding(global::System.Type type, Tizen.NUI.Binding.TypeConverter userConverter)
         {
index d746596..9da10b2 100755 (executable)
@@ -31,7 +31,7 @@ namespace Tizen.NUI
         private const ushort pointDpi = 72;
 
         /// <summary>
-        /// An unique Singleton Instance of PointTypeConverter
+        /// An unique Singleton Instance of PointTypeConverter.
         /// </summary>
         /// <value>Singleton instance of PointTypeConverter</value>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
@@ -50,7 +50,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Converts script to pixel
+        /// Converts script to pixel.
         /// </summary>
         /// <returns>Pixel value that is converted from input string</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
@@ -92,7 +92,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Converts pixel to point type
+        /// Converts pixel to point type.
         /// </summary>
         /// <returns>An converted value from pixel</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
@@ -114,7 +114,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Converts pixel to point type
+        /// Converts pixel to point type.
         /// </summary>
         /// <returns>An converted value from pixel</returns>
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
diff --git a/src/Tizen.NUI/src/public/Utility/SpTypeConverter.cs b/src/Tizen.NUI/src/public/Utility/SpTypeConverter.cs
new file mode 100755 (executable)
index 0000000..d815fa2
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using System.Globalization;
+
+namespace Tizen.NUI
+{
+    /// <summary>
+    /// Default SpTypeConverter class to convert dp types.
+    /// </summary>
+    /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public sealed class SpTypeConverter : GraphicsTypeConverter
+    {
+        private volatile static SpTypeConverter spTypeConverter;
+
+        /// <summary>
+        /// An unique Singleton Instance of SpTypeConverter
+        /// </summary>
+        /// <value>Singleton instance of SpTypeConverter</value>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static SpTypeConverter Instance
+        {
+            get
+            {
+                if (spTypeConverter == null)
+                {
+                    spTypeConverter = new SpTypeConverter();
+                }
+
+                return spTypeConverter;
+            }
+        }
+
+        /// <summary>
+        /// Converts script to pixel
+        /// </summary>
+        /// <returns>Pixel value that is converted from input string</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public override float ConvertScriptToPixel(string scriptValue)
+        {
+            float convertedValue = 0;
+            if (scriptValue != null)
+            {
+                if (scriptValue.EndsWith("sp"))
+                {
+                    convertedValue = ConvertToPixel(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("sp")), CultureInfo.InvariantCulture));
+                }
+                else
+                {
+                    if (!float.TryParse(scriptValue, NumberStyles.Any, CultureInfo.InvariantCulture, out convertedValue))
+                    {
+                        NUILog.Error("Cannot convert the script {scriptValue}\n");
+                        convertedValue = 0;
+                    }
+                }
+            }
+            return convertedValue;
+        }
+
+        /// <summary>
+        /// Converts sp type to pixel
+        /// </summary>
+        /// <returns>Pixel value that is converted by the the display matric</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public override float ConvertToPixel(float value)
+        {
+            return value * (GraphicsTypeManager.Instance.ScaledDpi / (float)GraphicsTypeManager.Instance.BaselineDpi);
+        }
+
+        /// <summary>
+        /// Converts pixel to sp type
+        /// </summary>
+        /// <returns>An converted value from pixel</returns>
+        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public override float ConvertFromPixel(float value)
+        {
+            return value * (GraphicsTypeManager.Instance.BaselineDpi / (float)GraphicsTypeManager.Instance.ScaledDpi);
+        }
+    }
+}
index aa014a3..022ebe2 100755 (executable)
@@ -8,20 +8,28 @@ namespace Tizen.NUI.Samples
         private int oldPageCount = 0;
 
         private Window window;
-        private View rootView;
+        private ScrollableBase rootView;
 
         public void Activate()
         {
             window = NUIApplication.GetDefaultWindow();
 
-            rootView = new View()
+            rootView = new ScrollableBase()
             {
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HeightSpecification = LayoutParamPolicies.MatchParent,
-                Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Vertical}
+                Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Vertical},
+                Padding = new Extents(20, 20, 0, 0)
             };
 
             /* GraphicsTypeManager test. */
+            var managerTitleText = new TextLabel();
+            managerTitleText.Text = "GraphicsTypeManager";
+            managerTitleText.PointSize = 40;
+            managerTitleText.TextColor = Color.Blue;
+            managerTitleText.Padding = new Extents(0, 0, 0, 10);
+            rootView.Add(managerTitleText);
+
             var baseDpiText = new TextLabel();
             baseDpiText.Text = $"Baseline Dpi : {GraphicsTypeManager.Instance.BaselineDpi}";
             rootView.Add(baseDpiText);
@@ -42,11 +50,14 @@ namespace Tizen.NUI.Samples
             scaledDpiText.Text = $"Scaled Dpi : {GraphicsTypeManager.Instance.ScaledDpi}";
             rootView.Add(scaledDpiText);
 
-            var defConvertText = new TextLabel();
-            defConvertText.Text = $"DefaultTypeConverter : {GraphicsTypeManager.Instance.TypeConverter}";
-            rootView.Add(defConvertText);
-
             /* GraphicsTypeConverter test. */
+            var converterTitleText = new TextLabel();
+            converterTitleText.Text = "GraphicsTypeConverter";
+            converterTitleText.PointSize = 40;
+            converterTitleText.TextColor = Color.Red;
+            converterTitleText.Padding = new Extents(0, 0, 10, 10);
+            rootView.Add(converterTitleText);
+
             var dpConvertText = new TextLabel();
             var dp = 100.0f;
             dpConvertText.Text = $"dp : {dp}, pixel : {DpTypeConverter.Instance.ConvertToPixel(dp)}";
@@ -54,87 +65,113 @@ namespace Tizen.NUI.Samples
 
             var pxConvertText = new TextLabel();
             var px = 100.0f;
-            pxConvertText.Text = $"pixel : {px}, dp : {DpTypeConverter.Instance.ConvertToPixel(px)}";
+            pxConvertText.Text = $"pixel : {px}, dp : {DpTypeConverter.Instance.ConvertFromPixel(px)}";
             rootView.Add(pxConvertText);
 
-            /* GraphicsTypeExtension test. */
-            var dpToPixelText = new TextLabel();
-            dpToPixelText.Text = $"dp : {100.01f}, pixel : {100.01f.ToPixel()}";
-            rootView.Add(dpToPixelText);
-
-            var pixelToDpText = new TextLabel();
-            pixelToDpText.Text = $"pixel : {60.01f}, dp : {60.01f.ToDp()}";
-            rootView.Add(pixelToDpText);
+            var spConvertText = new TextLabel();
+            var sp = 100.0f;
+            spConvertText.Text = $"sp : {sp}, pixel : {SpTypeConverter.Instance.ConvertToPixel(sp)}";
+            rootView.Add(spConvertText);
 
-            var dpToPixel2Text = new TextLabel();
-            dpToPixel2Text.Text = $"dp : {100}, pixel : {100.ToPixel()}";
-            rootView.Add(dpToPixel2Text);
+            pxConvertText = new TextLabel();
+            px = 100.0f;
+            pxConvertText.Text = $"pixel : {px}, sp : {PointTypeConverter.Instance.ConvertFromPixel(px)}";
+            rootView.Add(pxConvertText);
 
-            var pixelToDp2Text = new TextLabel();
-            pixelToDp2Text.Text = $"pixel : {60}, dp : {60.ToDp()}";
-            rootView.Add(pixelToDp2Text);
+            var ptConvertText = new TextLabel();
+            var pt = 100.0f;
+            ptConvertText.Text = $"point : {pt}, pixel : {PointTypeConverter.Instance.ConvertToPixel(pt)}";
+            rootView.Add(pxConvertText);
 
-            var dpToPixelSizeText = new TextLabel();
-            var dpSize = new Size(100.0f, 100.0f);
-            var pixelSize = dpSize.ToPixel();
-            dpToPixelSizeText.Text = $"dp : ({dpSize.Width}, {dpSize.Height}), pixel : ({pixelSize.Width}, {pixelSize.Height})";
-            rootView.Add(dpToPixelSizeText);
+            pxConvertText = new TextLabel();
+            px = 100.0f;
+            pxConvertText.Text = $"pixel : {px}, point : {PointTypeConverter.Instance.ConvertFromPixel(px)}";
+            rootView.Add(pxConvertText);
 
-            var pixelToDpSizeText = new TextLabel();
+            /* GraphicsTypeExtension test. */
+            var extTitleText = new TextLabel();
+            extTitleText.Text = "GraphicsTypeExtensions";
+            extTitleText.PointSize = 40;
+            extTitleText.TextColor = Color.Green;
+            extTitleText.Padding = new Extents(0, 0, 10, 10);
+            rootView.Add(extTitleText);
+
+            var spToPxFloatText = new TextLabel();
+            spToPxFloatText.Text = $"sp : {100.01f}, pixel : {100.01f.SpToPx()}";
+            rootView.Add(spToPxFloatText);
+
+            var pixelToSpFloatText = new TextLabel();
+            pixelToSpFloatText.Text = $"pixel : {60.01f}, sp : {60.01f.PxToSp()}";
+            rootView.Add(pixelToSpFloatText);
+
+            var spToPxIntText = new TextLabel();
+            spToPxIntText.Text = $"sp : {100}, pixel : {100.SpToPx()}";
+            rootView.Add(spToPxIntText);
+
+            var pixelToSpIntText = new TextLabel();
+            pixelToSpIntText.Text = $"pixel : {60}, sp : {60.PxToSp()}";
+            rootView.Add(pixelToSpIntText);
+
+            var spToPxSizeText = new TextLabel();
+            var spSize = new Size(100.0f, 100.0f);
+            var pixelSize = spSize.SpToPx();
+            spToPxSizeText.Text = $"sp : ({spSize.Width}, {spSize.Height}), pixel : ({pixelSize.Width}, {pixelSize.Height})";
+            rootView.Add(spToPxSizeText);
+
+            var pixelToSpSizeText = new TextLabel();
             pixelSize = new Size(100.0f, 100.0f);
-            dpSize = pixelSize.ToDp();
-            pixelToDpSizeText.Text = $"pixel : ({pixelSize.Width}, {pixelSize.Height}), dp : ({dpSize.Width}, {dpSize.Height})";
-            rootView.Add(pixelToDpSizeText);
+            spSize = pixelSize.PxToSp();
+            pixelToSpSizeText.Text = $"pixel : ({pixelSize.Width}, {pixelSize.Height}), sp : ({spSize.Width}, {spSize.Height})";
+            rootView.Add(pixelToSpSizeText);
 
-            var dpToPixelPosText = new TextLabel();
-            var dpPos = new Position(100.0f, 100.0f);
-            var pixelPos = dpPos.ToPixel();
-            dpToPixelPosText.Text = $"dp : ({dpPos.X}, {dpPos.Y}), pixel : ({pixelPos.X}, {pixelPos.Y})";
-            rootView.Add(dpToPixelPosText);
+            var spToPxPosText = new TextLabel();
+            var spPos = new Position(100.0f, 100.0f);
+            var pixelPos = spPos.SpToPx();
+            spToPxPosText.Text = $"sp : ({spPos.X}, {spPos.Y}), pixel : ({pixelPos.X}, {pixelPos.Y})";
+            rootView.Add(spToPxPosText);
 
-            var pixelToDpPosText = new TextLabel();
+            var pixelToSpPosText = new TextLabel();
             pixelPos = new Position(100.0f, 100.0f);
-            dpPos = pixelPos.ToDp();
-            pixelToDpPosText.Text = $"pixel : ({pixelPos.X}, {pixelPos.Y}), dp : ({dpPos.X}, {dpPos.Y})";
-            rootView.Add(pixelToDpPosText);
+            spPos = pixelPos.PxToSp();
+            pixelToSpPosText.Text = $"pixel : ({pixelPos.X}, {pixelPos.Y}), sp : ({spPos.X}, {spPos.Y})";
+            rootView.Add(pixelToSpPosText);
 
-            var dpToPixelRectText = new TextLabel();
-            var dpRect = new Rectangle(100, 100, 100, 100);
-            var pixelRect = dpRect.ToPixel();
-            dpToPixelRectText.Text = $"dp : ({dpRect.X}, {dpRect.Y}, {dpRect.Width}, {dpRect.Height}), pixel : ({pixelRect.X}, {pixelRect.Y}, {pixelRect.Width}, {pixelRect.Height})";
-            rootView.Add(dpToPixelRectText);
+            var spToPxRectText = new TextLabel();
+            var spRect = new Rectangle(100, 100, 100, 100);
+            var pixelRect = spRect.SpToPx();
+            spToPxRectText.Text = $"sp : ({spRect.X}, {spRect.Y}, {spRect.Width}, {spRect.Height}), pixel : ({pixelRect.X}, {pixelRect.Y}, {pixelRect.Width}, {pixelRect.Height})";
+            rootView.Add(spToPxRectText);
 
-            var pixelToDpRectText = new TextLabel();
+            var pixelToSpRectText = new TextLabel();
             pixelRect =new Rectangle(100, 100, 100, 100);
-            dpRect = pixelRect.ToDp();
-            pixelToDpRectText.Text = $"pixel : ({pixelRect.X}, {pixelRect.Y}, {pixelRect.Width}, {pixelRect.Height}), dp : ({dpRect.X}, {dpRect.Y}, {dpRect.Width}, {dpRect.Height})";
-            rootView.Add(pixelToDpRectText);
+            spRect = pixelRect.PxToSp();
+            pixelToSpRectText.Text = $"pixel : ({pixelRect.X}, {pixelRect.Y}, {pixelRect.Width}, {pixelRect.Height}), sp : ({spRect.X}, {spRect.Y}, {spRect.Width}, {spRect.Height})";
+            rootView.Add(pixelToSpRectText);
 
-            var dpToPixelExtentText = new TextLabel();
-            var dpExtent = new Extents(10, 10, 10, 10);
-            var pixelExtent = dpExtent.ToPixel();
-            dpToPixelExtentText.Text = $"dp : ({dpExtent.Start}, {dpExtent.End}, {dpExtent.Top}, {dpExtent.Bottom}), pixel : ({pixelExtent.Start}, {pixelExtent.End}, {pixelExtent.Top}, {pixelExtent.Bottom})";
-            rootView.Add(dpToPixelExtentText);
+            var spToPxExtentText = new TextLabel();
+            var spExtent = new Extents(10, 10, 10, 10);
+            var pixelExtent = spExtent.SpToPx();
+            spToPxExtentText.Text = $"sp : ({spExtent.Start}, {spExtent.End}, {spExtent.Top}, {spExtent.Bottom}), pixel : ({pixelExtent.Start}, {pixelExtent.End}, {pixelExtent.Top}, {pixelExtent.Bottom})";
+            rootView.Add(spToPxExtentText);
 
             var pixelToDpExtentText = new TextLabel();
             pixelExtent =new Extents(10, 10, 10, 10);
-            dpExtent = pixelExtent.ToDp();
-            pixelToDpExtentText.Text = $"pixel : ({pixelExtent.Start}, {pixelExtent.End}, {pixelExtent.Top}, {pixelExtent.Bottom}), dp : ({dpExtent.Start}, {dpExtent.End}, {dpExtent.Top}, {dpExtent.Bottom})";
+            spExtent = pixelExtent.PxToSp();
+            pixelToDpExtentText.Text = $"pixel : ({pixelExtent.Start}, {pixelExtent.End}, {pixelExtent.Top}, {pixelExtent.Bottom}), sp : ({spExtent.Start}, {spExtent.End}, {spExtent.Top}, {spExtent.Bottom})";
             rootView.Add(pixelToDpExtentText);
 
             var pixelToPointText = new TextLabel();
             var fontPxSize = 30.0f;
-            pixelToPointText.PointSize = fontPxSize.PixelToPoint();
-            pixelToPointText.Text = $"pixel : {fontPxSize}, point: {fontPxSize.PixelToPoint()}";
+            pixelToPointText.PointSize = fontPxSize.PxToPt();
+            pixelToPointText.Text = $"pixel : {fontPxSize}, point: {fontPxSize.PxToPt()}";
             rootView.Add(pixelToPointText);
 
             var dpToPointText = new TextLabel();
             var dpPxSize = 80.0f;
-            dpToPointText.PointSize = dpPxSize.DpToPoint();
-            dpToPointText.Text = $"pixel : {dpPxSize}, point: {dpPxSize.DpToPoint()}";
+            dpToPointText.PointSize = dpPxSize.DpToPt();
+            dpToPointText.Text = $"pixel : {dpPxSize}, point: {dpPxSize.DpToPt()}";
             rootView.Add(dpToPointText);
 
-
             window.Add(rootView);
         }