From 76e67227ec9bb8ece96f754ccaf2005812d2f4f7 Mon Sep 17 00:00:00 2001 From: Anuj Verma Date: Fri, 3 Jul 2020 08:41:22 +0530 Subject: [PATCH] * src/sdf/ftsdf.c (sdf_shape_dump): Add more info to the debug output. --- [GSoC]ChangeLog | 5 +++++ src/sdf/ftsdf.c | 59 ++++++++++++++++++++++++++++--------------------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog index 632510a42..2f7c96cf3 100644 --- a/[GSoC]ChangeLog +++ b/[GSoC]ChangeLog @@ -1,3 +1,8 @@ +2020-07-03 Anuj Verma + + * src/sdf/ftsdf.c (sdf_shape_dump): Add more info + to the debug output. + 2020-07-03 Anuj Verma * src/sdf/ftsdf.c (MAX_NEWTON_ITERATION => MAX_NEWTON_DIVISIONS): diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c index b2ede4d3d..c0f4e1eed 100644 --- a/src/sdf/ftsdf.c +++ b/src/sdf/ftsdf.c @@ -569,6 +569,9 @@ { FT_UInt num_contours = 0; FT_UInt total_edges = 0; + FT_UInt total_lines = 0; + FT_UInt total_conic = 0; + FT_UInt total_cubic = 0; FT_ListRec contour_list; @@ -598,38 +601,41 @@ SDF_Edge* edge = (SDF_Edge*)edge_list.head->data; - FT_TRACE5(( " Edge %d\n", num_edges )); + FT_TRACE5(( " Edge %d\n", num_edges )); switch (edge->edge_type) { case SDF_EDGE_LINE: - 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 )); + 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 )); + total_lines++; break; case SDF_EDGE_CONIC: - 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 )); + 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 )); + total_conic++; break; case SDF_EDGE_CUBIC: - 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 )); + 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 )); + total_cubic++; break; default: break; @@ -649,6 +655,9 @@ "in 26.6 fixed point format*\n" )); FT_TRACE5(( "total number of contours = %d\n", num_contours )); FT_TRACE5(( "total number of edges = %d\n", total_edges )); + FT_TRACE5(( " |__lines = %d\n", total_lines )); + FT_TRACE5(( " |__conic = %d\n", total_conic )); + FT_TRACE5(( " |__cubic = %d\n", total_cubic )); FT_TRACE5(( "[sdf] sdf_shape_dump complete\n" )); FT_TRACE5(( "-------------------------------------------------\n" )); }