]> O.S.I.I.S - jp/crow.git/commitdiff
replace Debug.WriteLine with console MonoEmbed
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 27 Dec 2017 10:46:55 +0000 (11:46 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 27 Dec 2017 10:46:55 +0000 (11:46 +0100)
Crow.csproj
Default.style
Tests/BasicTests.cs
Tests/GOLIBTest_DirViewer.cs
Tests/OpenGL/Shader.cs
Tests/OpenGL/Texture.cs
Tests/Showcase.cs
src/Cairo/CairoHelpers.cs
src/GraphicObjects/GraphicObject.cs

index 1f3aacda41d1d8c76198e8acea6fe09707e2d7f5..fa34f37fab4aa1f86ee431cab0be0b6b005b9c9c 100644 (file)
@@ -30,7 +30,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
-    <DefineConstants>DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_LAYOUTING0;TRACE0;DEBUG0;__linux__;MEASURE_TIME0;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
+    <DefineConstants>DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_LAYOUTING0;TRACE0;DEBUG;__linux__;MEASURE_TIME0;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
     <Optimize>false</Optimize>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
index 0db6a08abd4cb0604bdb1cadef7dc57f7e0d314c..8deb2580939a6b0a3f908e6a5dcd10ad20dd1421 100644 (file)
@@ -107,8 +107,8 @@ Scroller {
 }
 Icon {
        Margin=1;
-       Width=12;
-       Height=12;
+       Width=16;
+       Height=16;
 }
 Control {
        Margin=0;
index 8d0a802621bababd2d7f5b5994a0122039013ac4..a14b51545af4014cd7930e788563ecc50640f4c6 100644 (file)
@@ -202,7 +202,7 @@ namespace Tests
                                GraphicObject obj = Load (testFiles[idx]);
                                obj.DataSource = this;
                        } catch (Exception ex) {
-                               Debug.WriteLine (ex.Message + ex.InnerException);
+                               Console.WriteLine (ex.Message + ex.InnerException);
                        }
                }
 //             void Tv_SelectedItemChanged (object sender, SelectionChangeEventArgs e)
@@ -224,7 +224,7 @@ namespace Tests
 //                     try {
 //                             i = Instantiator.CreateFromImlFragment (e.Text);
 //                     } catch (Exception ex) {
-//                             Debug.WriteLine (ex);
+//                             Console.WriteLine (ex);
 //                             return;
 //                     }
 //                     lock (ifaceControl.CrowInterface.UpdateMutex) {
@@ -261,7 +261,7 @@ namespace Tests
                        NotifyValueChanged ("PropertyLessBinding", test);
                }
                void onNew(object sender, EventArgs e){
-                       Debug.WriteLine ("menu new clicked");
+                       Console.WriteLine ("menu new clicked");
                }
        }
 }
index f17afb9b73714546916cf67b12a5cc149ebf2b40..966c3976852133a75fdffe781f1c57539f501e51 100644 (file)
@@ -87,7 +87,7 @@ namespace test2
                }
                public void onMouseDown(object sender, MouseButtonEventArgs e)
                {
-                       Debug.WriteLine (sender.ToString ());
+                       Console.WriteLine (sender.ToString ());
                }
                void OnSelectedItemChanged (object sender, SelectionChangeEventArgs e)
                {
index 6ae99b8910b3d47d6f94d8114176df738982ef8e..02ea82f69eeead96bd452e90851fcc7d5de56848 100644 (file)
@@ -209,8 +209,8 @@ namespace Crow
                        GL.GetProgramInfoLog(pgmId, out info);
 
                        if (!string.IsNullOrEmpty (info)) {
-                               Debug.WriteLine ("Linkage:");
-                               Debug.WriteLine (info);
+                               Console.WriteLine ("Linkage:");
+                               Console.WriteLine (info);
                        }
 
                        info = null;
@@ -218,8 +218,8 @@ namespace Crow
                        GL.ValidateProgram(pgmId);
                        GL.GetProgramInfoLog(pgmId, out info);
                        if (!string.IsNullOrEmpty (info)) {
-                               Debug.WriteLine ("Validation:");
-                               Debug.WriteLine (info);
+                               Console.WriteLine ("Validation:");
+                               Console.WriteLine (info);
                        }
 
                        GL.UseProgram (pgmId);
@@ -302,14 +302,14 @@ namespace Crow
 
                        string info;
                        GL.GetShaderInfoLog(shader, out info);
-                       Debug.WriteLine(info);
+                       Console.WriteLine(info);
 
                        int compileResult;
                        GL.GetShader(shader, ShaderParameter.CompileStatus, out compileResult);
                        if (compileResult != 1)
                        {
-                               Debug.WriteLine("Compile Error!");
-                               Debug.WriteLine(source);
+                               Console.WriteLine("Compile Error!");
+                               Console.WriteLine(source);
                        }
                }
                public override string ToString ()
index ce24808b4daab8e55a852ea890946052190c7a99..1656ad007a0f34301a5f01af3f9da3e7d6d68617 100644 (file)
@@ -60,7 +60,7 @@ namespace Crow
                                        GL.GenerateMipmap (GenerateMipmapTarget.Texture2D);
 
                                } catch (Exception ex) {
-                                       Debug.WriteLine ("Error loading texture: " + Map + ":" + ex.Message);
+                                       Console.WriteLine ("Error loading texture: " + Map + ":" + ex.Message);
                                }
                        }
                }
index 4880ede5b7f126c58619a2286320438122fe0fbd..402f6ea9f98b3e068cb3ff88d12207628ba27608 100644 (file)
@@ -114,7 +114,7 @@ namespace Tests
                                        g.DataSource = this;
                                }
                        } catch (Exception ex) {
-                               System.Diagnostics.Debug.WriteLine (ex.ToString ());
+                               System.Diagnostics.Console.WriteLine (ex.ToString ());
                                showError (ex);
                        }
                }
index 44060259b301448a19bcf4ecd2423c26dd6bed8b..e2aec1aec8118315fc3804f466de1e94926741b2 100644 (file)
@@ -80,8 +80,6 @@ namespace Crow
         }
         public static void DrawRoundedRectangle(Cairo.Context gr, double x, double y, double width, double height, double radius)
         {
-            gr.Save();
-
             if ((radius > height / 2) || (radius > width / 2))
                 radius = min(height / 2, width / 2);
 
@@ -94,7 +92,6 @@ namespace Crow
             gr.LineTo(x + radius, y + height);
             gr.Arc(x + radius, y + height - radius, radius, Math.PI / 2, Math.PI);
             gr.ClosePath();
-            gr.Restore();
         }
         public static void StrokeRaisedRectangle(Cairo.Context gr, Rectangle r, double width = 1)
         {
index 6118e8c45cd6227767450a7801e7199a881625eb..be41455fe89eaee8a131909774203543f8c21009 100644 (file)
@@ -546,7 +546,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue("sans,10")]
+               [XmlAttributeAttribute()][DefaultValue("sans,12")]
                public virtual Font Font {
                        get { return font; }
                        set {