ref: e9f330adf6eddd1a70a3da33a585b55e0ecddd46
parent: a56f95b26813613ccb123f2818bb4d4c63eac9e1
author: Werner Lemberg <[email protected]>
date: Thu Jan 24 04:12:56 EST 2013
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2013-01-23 Werner Lemberg <[email protected]>
+ [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 <[email protected]>
+
[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 <[email protected]>
- [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.
--- a/include/freetype/fttrigon.h
+++ b/include/freetype/fttrigon.h
@@ -339,14 +339,6 @@
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 );
-
/* */
--- 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 @@
* 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 )
--- 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
@@ -136,6 +137,22 @@
}
return shift;
+ }
+
+
+ /* 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 );
}
--- 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 */
--- 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"