[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] anuj-distance-field 35e77ae 31/95: * src/sdf/ftsdf.c (sdf_sh
From: |
Anuj Verma |
Subject: |
[freetype2] anuj-distance-field 35e77ae 31/95: * src/sdf/ftsdf.c (sdf_shape_dump): Add more info to the debug output. |
Date: |
Sun, 2 Aug 2020 01:10:30 -0400 (EDT) |
branch: anuj-distance-field
commit 35e77aeee03a92522b1a0753e1c033413bb23afd
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>
* 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 632510a..2f7c96c 100644
--- a/[GSoC]ChangeLog
+++ b/[GSoC]ChangeLog
@@ -1,5 +1,10 @@
2020-07-03 Anuj Verma <anujv@iitbhilai.ac.in>
+ * src/sdf/ftsdf.c (sdf_shape_dump): Add more info
+ to the debug output.
+
+2020-07-03 Anuj Verma <anujv@iitbhilai.ac.in>
+
* src/sdf/ftsdf.c (MAX_NEWTON_ITERATION => MAX_NEWTON_DIVISIONS):
Renamed to avoid confusion.
diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index b2ede4d..c0f4e1e 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" ));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] anuj-distance-field 35e77ae 31/95: * src/sdf/ftsdf.c (sdf_shape_dump): Add more info to the debug output.,
Anuj Verma <=