freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] anuj-distance-field 8e955b3 11/95: * src/sdf/ftsdf.c (sdf_sh


From: Anuj Verma
Subject: [freetype2] anuj-distance-field 8e955b3 11/95: * src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX' instead of `printf'.
Date: Sun, 2 Aug 2020 01:10:25 -0400 (EDT)

branch: anuj-distance-field
commit 8e955b3ae23e485334d7d57fc74df5cc1ac091d2
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>

    * src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX' instead of `printf'.
---
 [GSoC]ChangeLog |  5 ++++
 src/sdf/ftsdf.c | 74 ++++++++++++++++++++++++++++++---------------------------
 2 files changed, 44 insertions(+), 35 deletions(-)

diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog
index e244159..a4bf588 100644
--- a/[GSoC]ChangeLog
+++ b/[GSoC]ChangeLog
@@ -1,5 +1,10 @@
 2020-06-26  Anuj Verma  <anujv@iitbhilai.ac.in>
 
+       * src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX'
+         instead of `printf'.
+
+2020-06-26  Anuj Verma  <anujv@iitbhilai.ac.in>
+
        * src/sdf/ftsdf.c (sdf_shape_dump): Added function to
          dump the `SDF_Shape' on the console for debugging.
 
diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index c69507a..8c57863 100644
--- a/src/sdf/ftsdf.c
+++ b/src/sdf/ftsdf.c
@@ -469,14 +469,14 @@
 
     if ( !shape )
     {
-      printf( "[sdf] sdf_shape_dump: null shape\n" );
+      FT_TRACE5(( "[sdf] sdf_shape_dump: null shape\n" ));
       return;
     }
 
     contour_list = shape->contours;
 
-    printf( "-------------------------------------------------\n" );
-    printf( "[sdf] sdf_shape_dump:\n" );
+    FT_TRACE5(( "-------------------------------------------------\n" ));
+    FT_TRACE5(( "[sdf] sdf_shape_dump:\n" ));
 
     while ( contour_list.head != NULL )
     {
@@ -486,45 +486,45 @@
 
 
       edge_list = contour->edges;
-      printf( "Contour %d\n", num_contours );
+      FT_TRACE5(( "Contour %d\n", num_contours ));
 
       while ( edge_list.head != NULL )
       {
         SDF_Edge*  edge = (SDF_Edge*)edge_list.head->data;
 
 
-        printf( "    Edge %d\n", num_edges );
+        FT_TRACE5(( "    Edge %d\n", num_edges ));
 
         switch (edge->edge_type) {
         case SDF_EDGE_LINE:
-          printf( "        Edge Type: Line\n" );
-          printf( "        ---------------\n" );
-          printf( "        Start Pos: %d, %d\n", edge->start_pos.x,
-                                                 edge->start_pos.y );
-          printf( "        End Pos  : %d, %d\n", edge->end_pos.x,
-                                                 edge->end_pos.y );
+          FT_TRACE5(( "        Edge Type: Line\n" ));
+          FT_TRACE5(( "        ---------------\n" ));
+          FT_TRACE5(( "        Start Pos: %d, %d\n", edge->start_pos.x,
+                                                     edge->start_pos.y ));
+          FT_TRACE5(( "        End Pos  : %d, %d\n", edge->end_pos.x,
+                                                     edge->end_pos.y ));
           break;
         case SDF_EDGE_CONIC:
-          printf( "        Edge Type: Conic Bezier\n" );
-          printf( "        -----------------------\n" );
-          printf( "        Start Pos: %d, %d\n", edge->start_pos.x,
-                                                 edge->start_pos.y );
-          printf( "        Ctrl1 Pos: %d, %d\n", edge->control_a.x,
-                                                 edge->control_a.y );
-          printf( "        End Pos  : %d, %d\n", edge->end_pos.x,
-                                                 edge->end_pos.y );
+          FT_TRACE5(( "        Edge Type: Conic Bezier\n" ));
+          FT_TRACE5(( "        -----------------------\n" ));
+          FT_TRACE5(( "        Start Pos: %d, %d\n", edge->start_pos.x,
+                                                     edge->start_pos.y ));
+          FT_TRACE5(( "        Ctrl1 Pos: %d, %d\n", edge->control_a.x,
+                                                     edge->control_a.y ));
+          FT_TRACE5(( "        End Pos  : %d, %d\n", edge->end_pos.x,
+                                                     edge->end_pos.y ));
           break;
         case SDF_EDGE_CUBIC:
-          printf( "        Edge Type: Cubic Bezier\n" );
-          printf( "        -----------------------\n" );
-          printf( "        Start Pos: %d, %d\n", edge->start_pos.x,
-                                                 edge->start_pos.y );
-          printf( "        Ctrl1 Pos: %d, %d\n", edge->control_a.x,
-                                                 edge->control_a.y );
-          printf( "        Ctrl2 Pos: %d, %d\n", edge->control_b.x,
-                                                 edge->control_b.y );
-          printf( "        End Pos  : %d, %d\n", edge->end_pos.x,
-                                                 edge->end_pos.y );
+          FT_TRACE5(( "        Edge Type: Cubic Bezier\n" ));
+          FT_TRACE5(( "        -----------------------\n" ));
+          FT_TRACE5(( "        Start Pos: %d, %d\n", edge->start_pos.x,
+                                                     edge->start_pos.y ));
+          FT_TRACE5(( "        Ctrl1 Pos: %d, %d\n", edge->control_a.x,
+                                                     edge->control_a.y ));
+          FT_TRACE5(( "        Ctrl2 Pos: %d, %d\n", edge->control_b.x,
+                                                     edge->control_b.y ));
+          FT_TRACE5(( "        End Pos  : %d, %d\n", edge->end_pos.x,
+                                                     edge->end_pos.y ));
           break;
         default:
             break;
@@ -539,12 +539,12 @@
       contour_list.head = contour_list.head->next;
     }
 
-    printf( "\n" );
-    printf( "*note the above values are in 26.6 fixed point format*\n" );
-    printf( "[sdf] total number of contours = %d\n", num_contours );
-    printf( "[sdf] total number of edges    = %d\n", total_edges );
-    printf( "[sdf] sdf_shape_dump complete\n" );
-    printf( "-------------------------------------------------\n" );
+    FT_TRACE5(( "\n" ));
+    FT_TRACE5(( "*note: the above values are in 26.6 fixed point format*\n" ));
+    FT_TRACE5(( "[sdf] total number of contours = %d\n", num_contours ));
+    FT_TRACE5(( "[sdf] total number of edges    = %d\n", total_edges ));
+    FT_TRACE5(( "[sdf] sdf_shape_dump complete\n" ));
+    FT_TRACE5(( "-------------------------------------------------\n" ));
   }
 
 #endif
@@ -604,6 +604,8 @@
     FT_UNUSED( raster );
     FT_UNUSED( params );
 
+    /* temporary */
+
     FT_Memory  memory = (FT_Memory)((SDF_TRaster*)raster)->memory;
 
     SDF_Shape * shape = NULL;
@@ -615,6 +617,8 @@
 
     sdf_shape_done( memory, &shape );
 
+    /* --------- */
+
     return FT_THROW( Unimplemented_Feature );
   }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]