[NUI] VectorGraphics: Modify code format
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 30 Mar 2021 05:10:31 +0000 (14:10 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 1 Apr 2021 01:24:35 +0000 (10:24 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.CanvasView.cs
src/Tizen.NUI/src/internal/Interop/Interop.Drawable.cs
src/Tizen.NUI/src/internal/Interop/Interop.Shape.cs
src/Tizen.NUI/src/public/BaseComponents/VectorGraphcis/CanvasView.cs
src/Tizen.NUI/src/public/BaseComponents/VectorGraphcis/Drawable.cs
src/Tizen.NUI/src/public/BaseComponents/VectorGraphcis/Shape.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/CanvasViewSamsple.cs

index e20ad55..9cd2547 100755 (executable)
@@ -14,7 +14,7 @@
  * limitations under the License.
  *
  */
+
 namespace Tizen.NUI
 {
     internal static partial class Interop
index 75fbd25..5c45dd7 100755 (executable)
@@ -39,5 +39,5 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Drawable_Transform")]
             public static extern bool Transform(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)] float[] jarg2);
         }
-}
     }
+}
index a074d00..9838180 100755 (executable)
@@ -24,7 +24,7 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_New")]
             public static extern global::System.IntPtr New();
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_AddRect")]            
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_AddRect")]
             public static extern bool AddRect(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2, float jarg3, float jarg4, float jarg5, float jarg6, float jarg7);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_AddCircle")]
@@ -71,10 +71,10 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_SetStrokeDash")]
             public static extern void SetStrokeDash(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)] float[] jarg2, int jarg3);
-            
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_GetStrokeDashIndexOf")]
             public static extern float GetStrokeDashIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
-            
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_GetStrokeDashCount")]
             public static extern int GetStrokeDashCount(global::System.Runtime.InteropServices.HandleRef jarg1);
 
index ce63647..830dcf2 100755 (executable)
@@ -21,11 +21,11 @@ using System.Diagnostics.CodeAnalysis;
 namespace Tizen.NUI.BaseComponents.VectorGraphics
 {
     /// <summary>
-    /// CanvasView is a class for displaying vector primitives.<br />
+    /// CanvasView is a class for displaying vector primitives.
     /// </summary>
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class CanvasView : View
-    {            
+    {
         static CanvasView() { }
 
         /// <summary>
@@ -48,7 +48,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         }
 
         /// <summary>
-        /// you can override it to clean-up your own resources.
+        /// You can override it to clean-up your own resources.
         /// </summary>
         /// <param name="type">DisposeTypes</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -68,7 +68,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
             Interop.CanvasView.DeleteCanvasView(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
-        
+
         /// <summary>
         /// Add drawable object to the CanvasView.
         /// This method is similar to registration. The added shape is drawn on the inner canvas.
@@ -76,9 +76,9 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// <param name="drawable">Drawable object</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void AddDrawable(Drawable drawable)
-        {   
+        {
             Interop.CanvasView.AddDrawable(View.getCPtr(this), BaseHandle.getCPtr(drawable));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
     }
-}
\ No newline at end of file
+}
index e03d5bf..b6dca59 100755 (executable)
@@ -40,14 +40,16 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public float Opacity
-        {   
-            get {
+        {
+            get
+            {
                 return Interop.Drawable.GetOpacity(BaseHandle.getCPtr(this));
             }
-            set {
+            set
+            {
                 Interop.Drawable.SetOpacity(BaseHandle.getCPtr(this), value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }   
+            }
         }
 
         /// <summary>
@@ -57,7 +59,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// <returns>True when it's successful. False otherwise.</returns>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool Rotate(float degree)
-        {   
+        {
             bool ret = Interop.Drawable.Rotate(BaseHandle.getCPtr(this), degree);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -70,7 +72,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// <returns>True when it's successful. False otherwise.</returns>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool Scale(float factor)
-        {   
+        {
             bool ret = Interop.Drawable.Scale(BaseHandle.getCPtr(this), factor);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -85,7 +87,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// <exception cref="ArgumentException"> Thrown when matrix array length is not 9. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool Transform(float[] matrix)
-        {   
+        {
             if (matrix == null)
             {
                 throw new ArgumentNullException(nameof(matrix));
@@ -107,7 +109,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// <returns>True when it's successful. False otherwise.</returns>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool Translate(float x, float y)
-        {   
+        {
             bool ret = Interop.Drawable.Translate(BaseHandle.getCPtr(this), x, y);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 2ffe8b6..fddd1a3 100755 (executable)
@@ -1,4 +1,4 @@
-/*
+/* 
 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -102,12 +102,14 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public Color FillColor
-        {   
-            get {
+        {
+            get
+            {
                 global::System.IntPtr cPtr = Interop.Shape.GetFillColor(BaseHandle.getCPtr(this));
                 return Vector4.GetVector4FromPtr(cPtr);
             }
-            set {
+            set
+            {
                 Interop.Shape.SetFillColor(BaseHandle.getCPtr(this), Vector4.getCPtr(value));
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
@@ -119,10 +121,12 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         [EditorBrowsable(EditorBrowsableState.Never)]
         public FillRuleType FillRule
         {
-            get {
+            get
+            {
                 return (FillRuleType)Interop.Shape.GetFillRule(BaseHandle.getCPtr(this));
             }
-            set {
+            set
+            {
                 Interop.Shape.SetFillRule(BaseHandle.getCPtr(this), (int)value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
@@ -134,10 +138,12 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         [EditorBrowsable(EditorBrowsableState.Never)]
         public float StrokeWidth
         {
-            get {
+            get
+            {
                 return Interop.Shape.GetStrokeWidth(BaseHandle.getCPtr(this));
             }
-            set {
+            set
+            {
                 Interop.Shape.SetStrokeWidth(BaseHandle.getCPtr(this), value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
@@ -149,11 +155,13 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         [EditorBrowsable(EditorBrowsableState.Never)]
         public Color StrokeColor
         {
-            get {
+            get
+            {
                 global::System.IntPtr cPtr = Interop.Shape.GetStrokeColor(BaseHandle.getCPtr(this));
                 return Vector4.GetVector4FromPtr(cPtr);
             }
-            set {
+            set
+            {
                 Interop.Shape.SetStrokeColor(BaseHandle.getCPtr(this), Vector4.getCPtr(value));
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
@@ -165,10 +173,12 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         [EditorBrowsable(EditorBrowsableState.Never)]
         public StrokeCapType StrokeCap
         {
-            get {
+            get
+            {
                 return (StrokeCapType)Interop.Shape.GetStrokeCap(BaseHandle.getCPtr(this));
             }
-            set {
+            set
+            {
                 Interop.Shape.SetStrokeCap(BaseHandle.getCPtr(this), (int)value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
@@ -181,13 +191,15 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         [EditorBrowsable(EditorBrowsableState.Never)]
         public StrokeJoinType StrokeJoin
         {
-            get {
+            get
+            {
                 return (StrokeJoinType)Interop.Shape.GetStrokeJoin(BaseHandle.getCPtr(this));
             }
-            set {
+            set
+            {
                 Interop.Shape.SetStrokeJoin(BaseHandle.getCPtr(this), (int)value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }   
+            }
         }
 
         /// <summary>
@@ -197,18 +209,20 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         [EditorBrowsable(EditorBrowsableState.Never)]
         public ReadOnlyCollection<float> StrokeDash
         {
-            get {
+            get
+            {
                 List<float> retList = new List<float>();
                 int patternCount = Interop.Shape.GetStrokeDashCount(BaseHandle.getCPtr(this));
                 for (int i = 0; i < patternCount; i++)
                 {
                     retList.Add(Interop.Shape.GetStrokeDashIndexOf(BaseHandle.getCPtr(this), i));
                 }
-                
+
                 ReadOnlyCollection<float> ret = new ReadOnlyCollection<float>(retList);
                 return ret;
             }
-            set {
+            set
+            {
                 if (value == null)
                 {
                     throw new ArgumentNullException(nameof(value));
@@ -220,7 +234,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
                 }
                 Interop.Shape.SetStrokeDash(BaseHandle.getCPtr(this), pattern, value.Count);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }    
+            }
         }
 
         /// <summary>
@@ -241,7 +255,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         /// <returns>True when it's successful. False otherwise.</returns>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool AddRect(float x, float y, float width, float height, float roundedCornerX, float roundedCornerY)
-        {   
+        {
             bool ret = Interop.Shape.AddRect(BaseHandle.getCPtr(this), x, y, width, height, roundedCornerX, roundedCornerY);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -329,7 +343,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool AddCubicTo(float controlPoint1X, float controlPoint1Y, float controlPoint2X, float controlPoint2Y, float endPointX, float endPointY)
         {
-            bool ret = Interop.Shape.AddCubicTo(BaseHandle.getCPtr(this),  controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, endPointX, endPointY);
+            bool ret = Interop.Shape.AddCubicTo(BaseHandle.getCPtr(this), controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, endPointX, endPointY);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index 23165ed..987d718 100644 (file)
@@ -12,7 +12,7 @@ namespace Tizen.NUI.Samples
         const string tag = "NUITEST";
 
         private View root;
-        private CanvasView canvasView ;
+        private CanvasView canvasView;
         private Shape shape;
         private Timer timer;
         private int count = 0;
@@ -57,10 +57,10 @@ namespace Tizen.NUI.Samples
                 FillColor = new Color(0.0f, 0.0f, 1.0f, 1.0f),
                 StrokeColor = new Color(1.0f, 1.0f, 0.0f, 1.0f),
                 StrokeWidth = 10.0f,
-                StrokeDash = new List<float>(){15.0f, 30.0f}.AsReadOnly(),
+                StrokeDash = new List<float>() { 15.0f, 30.0f }.AsReadOnly(),
             };
             shape2.AddCircle(0.0f, 0.0f, 150.0f, 100.0f);
-            shape2.Transform(new float[] {0.6f, 0.0f, 350.0f, 0.0f, 0.6f, 100.0f, 0.0f, 0.0f, 1.0f});        
+            shape2.Transform(new float[] { 0.6f, 0.0f, 350.0f, 0.0f, 0.6f, 100.0f, 0.0f, 0.0f, 1.0f });
 
             canvasView.AddDrawable(shape2);
 
@@ -89,10 +89,10 @@ namespace Tizen.NUI.Samples
             shape4.AddMoveTo(0.0f, -160.0f);
             shape4.AddLineTo(125.0f, 160.0f);
             shape4.AddLineTo(-180.0f, -45.0f);
-            shape4.AddLineTo(180.0f, -45.0f);    
+            shape4.AddLineTo(180.0f, -45.0f);
             shape4.AddLineTo(-125.0f, 160.0f);
             shape4.Close();
-            
+
             canvasView.AddDrawable(shape4);
 
             shape = new Shape()
@@ -138,7 +138,7 @@ namespace Tizen.NUI.Samples
             // Exception test.
             try
             {
-                shape2.Transform(new float[] {0.6f, 0.0f});
+                shape2.Transform(new float[] { 0.6f, 0.0f });
             }
             catch (ArgumentException e)
             {
@@ -160,7 +160,7 @@ namespace Tizen.NUI.Samples
             {
                 log.Debug(tag, "StrokeDash setter : " + e.Message + "\n");
             }
-            
+
             root.Add(canvasView);
 
             timer = new Timer(1000 / 32);