From f02d1acb8988b91071719f6a33564da96a28c306 Mon Sep 17 00:00:00 2001 From: Anuj Verma Date: Fri, 26 Jun 2020 11:34:41 +0530 Subject: [PATCH] * 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 e244159e1..a4bf58866 100644 --- a/[GSoC]ChangeLog +++ b/[GSoC]ChangeLog @@ -1,3 +1,8 @@ +2020-06-26 Anuj Verma + + * src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX' + instead of `printf'. + 2020-06-26 Anuj Verma * src/sdf/ftsdf.c (sdf_shape_dump): Added function to diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c index c69507a90..8c578638c 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 ); }