From 8d64a8211996954629765c634ecf4ab456766378 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Tue, 4 Jul 2017 17:11:32 +0900 Subject: [PATCH] [Tizen] Color constant value setting Change-Id: I5c14d5297a0bd28d11c249d61c3dec4b06f9f1b9 Signed-off-by: dongsug.song --- Tizen.NUI/src/public/Color.cs | 99 ++++--------------------------------------- 1 file changed, 9 insertions(+), 90 deletions(-) diff --git a/Tizen.NUI/src/public/Color.cs b/Tizen.NUI/src/public/Color.cs index e2fae00..1d3d55c 100755 --- a/Tizen.NUI/src/public/Color.cs +++ b/Tizen.NUI/src/public/Color.cs @@ -447,128 +447,47 @@ namespace Tizen.NUI /// /// Get black colored Color class. /// - public static Color Black - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.BLACK_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Black = new Color(0.0f, 0.0f, 0.0f, 1.0f); /// /// Get white colored Color class. /// - public static Color White - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.WHITE_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color White = new Color(1.0f, 1.0f, 1.0f, 1.0f); /// /// Get red colored Color class. /// - public static Color Red - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.RED_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Red = new Color(1.0f, 0.0f, 0.0f, 1.0f); /// /// Get green colored Color class. /// - public static Color Green - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.GREEN_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Green = new Color(0.0f, 1.0f, 0.0f, 1.0f); /// /// Get blue colored Color class. /// - public static Color Blue - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.BLUE_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Blue = new Color(0.0f, 0.0f, 1.0f, 1.0f); /// /// Get yellow colored Color class. /// - public static Color Yellow - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.YELLOW_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Yellow = new Color(1.0f, 1.0f, 0.0f, 1.0f); /// /// Get magenta colored Color class. /// - public static Color Magenta - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.MAGENTA_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Magenta = new Color(1.0f, 0.0f, 1.0f, 1.0f); /// /// Get cyan colored Color class. /// - public static Color Cyan - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.CYAN_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Cyan = new Color(0.0f, 1.0f, 1.0f, 1.0f); /// /// Get transparent colored Color class. /// - public static Color Transparent - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.TRANSPARENT_get(); - Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } + public static readonly Color Transparent = new Color(0.0f, 0.0f, 0.0f, 0.0f); /// /// convert Color class to Vector4 class implicitly. -- 2.7.4