[base] Rename FT_Bitmap_New' to FT_Bitmap_Init'.

* include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
Update all callers.

* docs/CHANGES: Updated.
This commit is contained in:
Werner Lemberg 2015-03-10 11:15:15 +01:00
parent 0aa36160d6
commit eee7d8baa1
7 changed files with 40 additions and 7 deletions

View File

@ -1,3 +1,12 @@
2015-03-10 Werner Lemberg <wl@gnu.org>
[base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
* include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
Update all callers.
* docs/CHANGES: Updated.
2015-03-06 Werner Lemberg <wl@gnu.org>
* src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.

View File

@ -21,6 +21,8 @@ CHANGES BETWEEN 2.5.5 and 2.6
need the lock to be held as long as the same `FT_Face' is not
used from multiple threads at the same time.
- Thai script support has been added to the auto-hinter.
III. MISCELLANEOUS
@ -32,6 +34,10 @@ CHANGES BETWEEN 2.5.5 and 2.6
This change doesn't break the ABI; however, it might cause
compiler warnings.
- Function `FT_Bitmap_New' has been renamed to `FT_Bitmap_Init',
since this name better reflects its function. For backwards
compatibility, the old function name is still available.
======================================================================

View File

@ -55,7 +55,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
/* FT_Bitmap_New */
/* FT_Bitmap_Init */
/* */
/* <Description> */
/* Initialize a pointer to an @FT_Bitmap structure. */
@ -63,6 +63,14 @@ FT_BEGIN_HEADER
/* <InOut> */
/* abitmap :: A pointer to the bitmap structure. */
/* */
/* <Note> */
/* A deprecated name for the same function is `FT_Bitmap_New'. */
/* */
FT_EXPORT( void )
FT_Bitmap_Init( FT_Bitmap *abitmap );
/* deprecated */
FT_EXPORT( void )
FT_Bitmap_New( FT_Bitmap *abitmap );
@ -202,7 +210,7 @@ FT_BEGIN_HEADER
/* FT_Bitmap_Done */
/* */
/* <Description> */
/* Destroy a bitmap object created with @FT_Bitmap_New. */
/* Destroy a bitmap object initialized with @FT_Bitmap_Init. */
/* */
/* <Input> */
/* library :: A handle to a library object. */

View File

@ -30,6 +30,16 @@
/* documentation is in ftbitmap.h */
FT_EXPORT_DEF( void )
FT_Bitmap_Init( FT_Bitmap *abitmap )
{
if ( abitmap )
*abitmap = null_bitmap;
}
/* deprecated function name; retained for ABI compatibility */
FT_EXPORT_DEF( void )
FT_Bitmap_New( FT_Bitmap *abitmap )
{
@ -297,7 +307,7 @@
/* convert to 8bpp */
FT_Bitmap_New( &tmp );
FT_Bitmap_Init( &tmp );
error = FT_Bitmap_Convert( library, bitmap, &tmp, 1 );
if ( error )
return error;
@ -759,7 +769,7 @@
FT_Error error;
FT_Bitmap_New( &bitmap );
FT_Bitmap_Init( &bitmap );
error = FT_Bitmap_Copy( slot->library, &slot->bitmap, &bitmap );
if ( error )
return error;

View File

@ -82,7 +82,7 @@
}
else
{
FT_Bitmap_New( &glyph->bitmap );
FT_Bitmap_Init( &glyph->bitmap );
error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap );
}

View File

@ -4123,7 +4123,7 @@
FT_Error err;
FT_Bitmap_New( &bitmap );
FT_Bitmap_Init( &bitmap );
/* this also converts the bitmap flow to `down' (i.e., pitch > 0) */
err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 );

View File

@ -1448,7 +1448,7 @@
FT_Library library = face->root.glyph->library;
FT_Bitmap_New( &new_map );
FT_Bitmap_Init( &new_map );
/* Convert to 8bit grayscale. */
error = FT_Bitmap_Convert( library, map, &new_map, 1 );