summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnuj Verma <anujv@iitbhilai.ac.in>2020-08-01 10:04:49 +0530
committeranujverma <anujv@iitbhilai.ac.in>2020-08-02 16:33:21 +0530
commit436f091db175161a426be2f3f3d865c99476d28b (patch)
treedac7a7d169b9ad84824ae4920d1afb44d77e47f4
parent903d28725acd8d3995d828980f5f3d515d27d755 (diff)
downloadfreetype2-436f091db175161a426be2f3f3d865c99476d28b.tar.gz
* src/sdf/ftbsdf.c (compare_neighbor): Fix bug.
-rw-r--r--[GSoC]ChangeLog4
-rw-r--r--src/sdf/ftbsdf.c10
2 files changed, 8 insertions, 6 deletions
diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog
index 2e77c565a..c790cbaee 100644
--- a/[GSoC]ChangeLog
+++ b/[GSoC]ChangeLog
@@ -1,5 +1,9 @@
2020-08-1 Anuj Verma <anujv@iitbhilai.ac.in>
+ * src/sdf/ftbsdf.c (compare_neighbor): Fix bug.
+
+2020-08-1 Anuj Verma <anujv@iitbhilai.ac.in>
+
[sdf -> bsdf] Optimized a bit.
* src/sdf/ftbsdf.c (ED: sign => alpha): Renamed sign
diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c
index dd05052af..73f63dc13 100644
--- a/src/sdf/ftbsdf.c
+++ b/src/sdf/ftbsdf.c
@@ -214,9 +214,6 @@
FT_16D16 alphas[9];
- if ( x == 41 && y == 72 )
- gx = 0;
-
/* Since our spread cannot be 0, this condition */
/* can never be true. */
if ( x <= 0 || x >= w - 1 ||
@@ -547,9 +544,10 @@
/* Of course this will be eliminated while using */
/* squared distances. */
- /* Approximate the distance, use 1 to avoid */
- /* precision errors. */
- dist = to_check->dist + ONE;
+ /* Approximate the distance, use 1 to avoid */
+ /* precision errors. We subtract because the */
+ /* two directions can be opposite. */
+ dist = to_check->dist - ONE;
if ( dist < current->dist )
{