FreeType-2.1.10 API Reference
Bitmap Handling
Synopsis
#FT_Bitmap_NewFT_Bitmap_New #FT_Bitmap_EmboldenFT_Bitmap_Embolden #FT_Bitmap_DoneFT_Bitmap_Done #FT_Bitmap_CopyFT_Bitmap_Copy #FT_Bitmap_ConvertFT_Bitmap_Convert This section contains functions for converting FT_Bitmap objects.
FT_Bitmap_New 
  FT_EXPORT( 
void )
  
FT_Bitmap_New( ft2-basic_types.html#FT_BitmapFT_Bitmap   *abitmap );
Initialize a pointer to an FT_Bitmap structure.
inout abitmap A pointer to the bitmap structure.
FT_Bitmap_Copy 
  FT_EXPORT_DEF( 
ft2-basic_types.html#FT_ErrorFT_Error  )
  
FT_Bitmap_Copy( ft2-base_interface.html#FT_LibraryFT_Library         library,
                  
const ft2-basic_types.html#FT_BitmapFT_Bitmap   *source,
                  
ft2-basic_types.html#FT_BitmapFT_Bitmap         *target);
Copies an bitmap into another one.
input library A handle to a library object.
source A handle to the source bitmap.
output target A handle to the target bitmap.
return FreeType error code. 0 means success.
FT_Bitmap_Embolden 
  FT_EXPORT_DEF( 
ft2-basic_types.html#FT_ErrorFT_Error  )
  
FT_Bitmap_Embolden( ft2-base_interface.html#FT_LibraryFT_Library   library,
                      
ft2-basic_types.html#FT_BitmapFT_Bitmap *  bitmap,
                      
ft2-basic_types.html#FT_PosFT_Pos       xStrength,
                      
ft2-basic_types.html#FT_PosFT_Pos       yStrength );
Embolden a bitmap. The new bitmap will be about `xStrength' pixels wider and `yStrength' pixels higher. The left and bottom borders are kept unchanged.
input library A handle to a library object.
xStrength How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.
yStrength How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.
inout bitmap A handle to the target bitmap.
return FreeType error code. 0 means success.
note The current implementation restricts `xStrength' to be less than or equal to 8 if bitmap is of pixel_mode ft2-basic_types.html#FT_Pixel_ModeFT_PIXEL_MODE_MONO .
Don't embolden the bitmap owned by a ft2-base_interface.html#FT_GlyphSlotFT_GlyphSlot  directly! Call ft2-bitmap_handling.html#FT_Bitmap_CopyFT_Bitmap_Copy  to get a copy and work on the copy instead.
FT_Bitmap_Convert 
  FT_EXPORT( 
ft2-basic_types.html#FT_ErrorFT_Error  )
  
FT_Bitmap_Convert( ft2-base_interface.html#FT_LibraryFT_Library         library,
                     
const ft2-basic_types.html#FT_BitmapFT_Bitmap   *source,
                     
ft2-basic_types.html#FT_BitmapFT_Bitmap         *target,
                     
ft2-basic_types.html#FT_IntFT_Int             alignment );
Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a bitmap object with depth 8bpp, making the number of used bytes per line (a.k.a. the `pitch') a multiple of `alignment'.
input library A handle to a library object.
source The source bitmap.
alignment The pitch of the bitmap is a multiple of this parameter. Common values are 1, 2, or 4.
output target The target bitmap.
return FreeType error code. 0 means success.
note It is possible to call ft2-bitmap_handling.html#FT_Bitmap_ConvertFT_Bitmap_Convert  multiple times without calling ft2-bitmap_handling.html#FT_Bitmap_DoneFT_Bitmap_Done  (the memory is simply reallocated).
Use ft2-bitmap_handling.html#FT_Bitmap_DoneFT_Bitmap_Done  to finally remove the bitmap object.
The `library' argument is taken to have access to FreeType's memory handling functions.
FT_Bitmap_Done 
  FT_EXPORT( 
ft2-basic_types.html#FT_ErrorFT_Error  )
  
FT_Bitmap_Done( ft2-base_interface.html#FT_LibraryFT_Library   library,
                  
ft2-basic_types.html#FT_BitmapFT_Bitmap   *bitmap );
Destroy a bitmap object created with ft2-bitmap_handling.html#FT_Bitmap_NewFT_Bitmap_New .
input library A handle to a library object.
bitmap The bitmap object to be freed.
return FreeType error code. 0 means success.
note The `library' argument is taken to have access to FreeType's memory handling functions.
