forked from minhngoc25a/freetype2
Minor documentation improvements and whitespace.
This commit is contained in:
parent
237c0abfdc
commit
8d05486eab
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* FreeType utility functions for bitmaps (specification). */
|
||||
/* */
|
||||
/* Copyright 2004-2006, 2008, 2013 by */
|
||||
/* Copyright 2004-2006, 2008, 2013, 2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -45,7 +45,9 @@ FT_BEGIN_HEADER
|
|||
/* Handling FT_Bitmap objects. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This section contains functions for converting FT_Bitmap objects. */
|
||||
/* This section contains functions for handling @FT_Bitmap objects. */
|
||||
/* Note that none of the functions changes the bitmap's `flow' (as */
|
||||
/* indicated by the sign of the `pitch' field in `FT_Bitmap'). */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
@ -122,6 +124,9 @@ FT_BEGIN_HEADER
|
|||
/* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
|
||||
/* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */
|
||||
/* */
|
||||
/* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */
|
||||
/* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Bitmap_Embolden( FT_Library library,
|
||||
FT_Bitmap* bitmap,
|
||||
|
|
|
@ -96,6 +96,9 @@
|
|||
}
|
||||
|
||||
|
||||
/* Enlarge `bitmap' horizontally and vertically by `xpixels' */
|
||||
/* and `ypixels', respectively. */
|
||||
|
||||
static FT_Error
|
||||
ft_bitmap_assure_buffer( FT_Memory memory,
|
||||
FT_Bitmap* bitmap,
|
||||
|
@ -175,9 +178,12 @@
|
|||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
/* otherwise allocate new buffer */
|
||||
if ( FT_QALLOC_MULT( buffer, new_pitch, bitmap->rows + ypixels ) )
|
||||
return error;
|
||||
|
||||
/* new rows get added at the top of the bitmap, */
|
||||
/* thus take care of the flow direction */
|
||||
if ( bitmap->pitch > 0 )
|
||||
{
|
||||
FT_Int len = ( width * bpp + 7 ) >> 3;
|
||||
|
@ -289,6 +295,7 @@
|
|||
if ( error )
|
||||
return error;
|
||||
|
||||
/* take care of bitmap flow */
|
||||
pitch = bitmap->pitch;
|
||||
if ( pitch > 0 )
|
||||
p = bitmap->buffer + pitch * ystr;
|
||||
|
@ -382,7 +389,7 @@
|
|||
FT_UInt l;
|
||||
|
||||
|
||||
/* Short-circuit transparent color to avoid div-by-zero. */
|
||||
/* Short-circuit transparent color to avoid division by zero. */
|
||||
if ( !a )
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue