diff options
author | Werner Lemberg <wl@gnu.org> | 2018-09-01 11:01:52 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2018-09-01 11:04:58 +0200 |
commit | 9be656bb0c0baa8df8c9fa30100e1cbe865346db (patch) | |
tree | dd538609d2d036d8797ad4c8da166bcf1a883048 /src/base | |
parent | 809d5125af527dd589d303cd8ae988dad58d00d6 (diff) | |
download | freetype2-9be656bb0c0baa8df8c9fa30100e1cbe865346db.tar.gz |
Remove `FT_Outline_{New,Done}_Internal'.
These public API functions(!) were always undocumented and have
escaped all clean-up efforts until now.
* include/freetype/ftoutln.h (FT_Outline_New_Internal,
FT_Outline_Done_Internal): Removed.
* src/base/ftoutln.h (FT_Outline_New_Internal,
FT_Outline_Done_Internal): Merge into...
(FT_Outline_New, FT_Outline_Done): ... these functions.
* docs/README: Updated.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/ftoutln.c | 72 |
1 files changed, 26 insertions, 46 deletions
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index 2266ce19c..85a469737 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -16,13 +16,6 @@ */ - /************************************************************************** - * - * All functions are declared in freetype.h. - * - */ - - #include <ft2build.h> #include FT_OUTLINE_H #include FT_INTERNAL_OBJECTS_H @@ -296,15 +289,23 @@ } + /* documentation is in ftoutln.h */ + FT_EXPORT_DEF( FT_Error ) - FT_Outline_New_Internal( FT_Memory memory, - FT_UInt numPoints, - FT_Int numContours, - FT_Outline *anoutline ) + FT_Outline_New( FT_Library library, + FT_UInt numPoints, + FT_Int numContours, + FT_Outline *anoutline ) { - FT_Error error; + FT_Error error; + FT_Memory memory; + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); + + memory = library->memory; + if ( !anoutline || !memory ) return FT_THROW( Invalid_Argument ); @@ -330,7 +331,7 @@ Fail: anoutline->flags |= FT_OUTLINE_OWNER; - FT_Outline_Done_Internal( memory, anoutline ); + FT_Outline_Done( library, anoutline ); return error; } @@ -339,22 +340,6 @@ /* documentation is in ftoutln.h */ FT_EXPORT_DEF( FT_Error ) - FT_Outline_New( FT_Library library, - FT_UInt numPoints, - FT_Int numContours, - FT_Outline *anoutline ) - { - if ( !library ) - return FT_THROW( Invalid_Library_Handle ); - - return FT_Outline_New_Internal( library->memory, numPoints, - numContours, anoutline ); - } - - - /* documentation is in ftoutln.h */ - - FT_EXPORT_DEF( FT_Error ) FT_Outline_Check( FT_Outline* outline ) { if ( outline ) @@ -436,13 +421,23 @@ } + /* documentation is in ftoutln.h */ + FT_EXPORT_DEF( FT_Error ) - FT_Outline_Done_Internal( FT_Memory memory, - FT_Outline* outline ) + FT_Outline_Done( FT_Library library, + FT_Outline* outline ) { + FT_Memory memory; + + + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); + if ( !outline ) return FT_THROW( Invalid_Outline ); + memory = library->memory; + if ( !memory ) return FT_THROW( Invalid_Argument ); @@ -460,21 +455,6 @@ /* documentation is in ftoutln.h */ - FT_EXPORT_DEF( FT_Error ) - FT_Outline_Done( FT_Library library, - FT_Outline* outline ) - { - /* check for valid `outline' in FT_Outline_Done_Internal() */ - - if ( !library ) - return FT_THROW( Invalid_Library_Handle ); - - return FT_Outline_Done_Internal( library->memory, outline ); - } - - - /* documentation is in ftoutln.h */ - FT_EXPORT_DEF( void ) FT_Outline_Get_CBox( const FT_Outline* outline, FT_BBox *acbox ) |