summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2013-01-24 09:12:56 +0100
committerWerner Lemberg <wl@gnu.org>2013-01-24 09:12:56 +0100
commite9f330adf6eddd1a70a3da33a585b55e0ecddd46 (patch)
treeb0a50d3e6325f0ecb45ff69796521c900c830709
parenta56f95b26813613ccb123f2818bb4d4c63eac9e1 (diff)
downloadfreetype2-e9f330adf6eddd1a70a3da33a585b55e0ecddd46.tar.gz
[base] Make `FT_Hypot' really internal.
* include/freetype/fttrigon.h (FT_Hypot): Move to... * include/freetype/internal/ftcalc.h: This file. * src/base/fttrigon.c (FT_Hypot): Move to... * src/base/ftcalc.c: This file. Include FT_TRIGONOMETRY_H. * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H.
-rw-r--r--ChangeLog15
-rw-r--r--include/freetype/fttrigon.h8
-rw-r--r--include/freetype/internal/ftcalc.h13
-rw-r--r--src/base/ftcalc.c19
-rw-r--r--src/base/fttrigon.c15
-rw-r--r--src/truetype/ttgload.c1
6 files changed, 43 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f440e395..b6011ddea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2013-01-23 Werner Lemberg <wl@gnu.org>
+ [base] Make `FT_Hypot' really internal.
+
+ * include/freetype/fttrigon.h (FT_Hypot): Move to...
+ * include/freetype/internal/ftcalc.h: This file.
+
+ * src/base/fttrigon.c (FT_Hypot): Move to...
+ * src/base/ftcalc.c: This file.
+ Include FT_TRIGONOMETRY_H.
+
+ * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H.
+
+2013-01-23 Werner Lemberg <wl@gnu.org>
+
[truetype] Revert change from 2013-01-22.
FreeType's `height' value is the baseline-to-baseline distance...
@@ -8,7 +21,7 @@
2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
- [base, truetype] New internal FT_Hypot function.
+ [base, truetype] New internal `FT_Hypot' function.
* include/freetype/fttrigon.h (FT_Hypot): Declare it.
* src/base/fttrigon.c (FT_Hypot): Define it.
diff --git a/include/freetype/fttrigon.h b/include/freetype/fttrigon.h
index f4d688abf..65143cb8c 100644
--- a/include/freetype/fttrigon.h
+++ b/include/freetype/fttrigon.h
@@ -339,14 +339,6 @@ FT_BEGIN_HEADER
FT_Fixed length,
FT_Angle angle );
- /*
- * Return sqrt(x*x+y*y), which is the same as FT_Vector_Length but uses
- * two fixed-point arguments instead.
- */
- FT_BASE( FT_Fixed )
- FT_Hypot( FT_Fixed x,
- FT_Fixed y );
-
/* */
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index e4924d05d..49631b930 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
-/* Copyright 1996-2006, 2008, 2009, 2012 by */
+/* Copyright 1996-2006, 2008, 2009, 2012-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -159,7 +159,16 @@ FT_BEGIN_HEADER
* Return the most significant bit index.
*/
FT_BASE( FT_Int )
- FT_MSB( FT_UInt32 z );
+ FT_MSB( FT_UInt32 z );
+
+
+ /*
+ * Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
+ * two fixed-point arguments instead.
+ */
+ FT_BASE( FT_Fixed )
+ FT_Hypot( FT_Fixed x,
+ FT_Fixed y );
#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 )
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 4122fdad6..b6c592ff7 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (body). */
/* */
-/* Copyright 1996-2006, 2008, 2012 by */
+/* Copyright 1996-2006, 2008, 2012-2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,6 +34,7 @@
#include <ft2build.h>
#include FT_GLYPH_H
+#include FT_TRIGONOMETRY_H
#include FT_INTERNAL_CALC_H
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
@@ -139,6 +140,22 @@
}
+ /* documentation is in ftcalc.h */
+
+ FT_BASE_DEF( FT_Fixed )
+ FT_Hypot( FT_Fixed x,
+ FT_Fixed y )
+ {
+ FT_Vector v;
+
+
+ v.x = x;
+ v.y = y;
+
+ return FT_Vector_Length( &v );
+ }
+
+
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/* documentation is in ftcalc.h */
diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c
index 25498f9ee..e8cc3e3a7 100644
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -492,19 +492,4 @@
}
- /* documentation is in fttrigon.h */
-
- FT_BASE_DEF( FT_Fixed )
- FT_Hypot( FT_Fixed x,
- FT_Fixed y )
- {
- FT_Vector v;
-
- v.x = x;
- v.y = y;
-
- return FT_Vector_Length( &v );
- }
-
-
/* END */
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index f611f457b..008b850ab 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -22,7 +22,6 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_TRUETYPE_TAGS_H
-#include FT_TRIGONOMETRY_H
#include FT_OUTLINE_H
#include "ttgload.h"