[gimp] app: more optional debug output (in #ifdef VERBOSE)



commit e22e881a9c1be204f6e76b4d0947a05f0c29543d
Author: Michael Natterer <mitch gimp org>
Date:   Sun Mar 28 20:46:23 2010 +0200

    app: more optional debug output (in #ifdef VERBOSE)

 app/text/gimptextlayout.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/app/text/gimptextlayout.c b/app/text/gimptextlayout.c
index 2a5c67f..c1968d1 100644
--- a/app/text/gimptextlayout.c
+++ b/app/text/gimptextlayout.c
@@ -226,6 +226,13 @@ gimp_text_layout_new (GimpText  *text,
         PANGO_PIXELS (gimp_text_layout_pixel_size (text->box_height,
                                                    text->box_unit,
                                                    yres));
+
+/* #define VERBOSE */
+
+#ifdef VERBOSE
+      g_printerr ("extents set to %d x %d\n",
+                  layout->extents.width, layout->extents.height);
+#endif
       break;
     }
 
@@ -488,10 +495,10 @@ gimp_text_layout_position (GimpTextLayout *layout)
   logical.width = ceil ((gdouble) logical.width * layout->xres / layout->yres);
 
 #ifdef VERBOSE
-  g_print ("ink rect: %d x %d @ %d, %d\n",
-           ink.width, ink.height, ink.x, ink.y);
-  g_print ("logical rect: %d x %d @ %d, %d\n",
-           logical.width, logical.height, logical.x, logical.y);
+  g_printerr ("ink rect: %d x %d @ %d, %d\n",
+              ink.width, ink.height, ink.x, ink.y);
+  g_printerr ("logical rect: %d x %d @ %d, %d\n",
+              logical.width, logical.height, logical.x, logical.y);
 #endif
 
   if (ink.width < 1 || ink.height < 1)
@@ -543,9 +550,9 @@ gimp_text_layout_position (GimpTextLayout *layout)
     }
 
 #ifdef VERBOSE
-  g_print ("layout extents: %d x %d @ %d, %d\n",
-           layout->extents.width, layout->extents.height,
-           layout->extents.x, layout->extents.y);
+  g_printerr ("layout extents: %d x %d @ %d, %d\n",
+              layout->extents.width, layout->extents.height,
+              layout->extents.x, layout->extents.y);
 #endif
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]