[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] anuj-distance-field 436f091 91/93: * src/sdf/ftbsdf.c (compa
From: |
Anuj Verma |
Subject: |
[freetype2] anuj-distance-field 436f091 91/93: * src/sdf/ftbsdf.c (compare_neighbor): Fix bug. |
Date: |
Sun, 2 Aug 2020 07:04:31 -0400 (EDT) |
branch: anuj-distance-field
commit 436f091db175161a426be2f3f3d865c99476d28b
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: anujverma <anujv@iitbhilai.ac.in>
* src/sdf/ftbsdf.c (compare_neighbor): Fix bug.
---
[GSoC]ChangeLog | 4 ++++
src/sdf/ftbsdf.c | 10 ++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog
index 2e77c56..c790cba 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 dd05052..73f63dc 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 )
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] anuj-distance-field 436f091 91/93: * src/sdf/ftbsdf.c (compare_neighbor): Fix bug.,
Anuj Verma <=