ref: 24fd93d6ec77155f5c2d604be2f7a1760d575919
parent: 644b1ad49e2da9662aa8d4d263896c9508c58ee0
author: Werner Lemberg <[email protected]>
date: Thu Mar 29 07:56:21 EDT 2007
formatting
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -142,30 +142,34 @@
if ( ypixels == 0 && new_pitch <= pitch )
{
/* zero the padding */
- FT_Int bit_width = pitch*8;
- FT_Int bit_last = (width + xpixels)*bpp;
+ FT_Int bit_width = pitch * 8;
+ FT_Int bit_last = ( width + xpixels ) * bpp;
+
if ( bit_last < bit_width )
{
- FT_Byte* line = bitmap->buffer + (bit_last >> 3);
- FT_Int shift = (bit_last & 7);
+ FT_Byte* line = bitmap->buffer + ( bit_last >> 3 );
+ FT_Int shift = bit_last & 7;
FT_UInt mask = 0xFF00U >> shift;
FT_Int count = height;
+
for ( ; count > 0; count--, line += pitch )
{
FT_Byte* write = line;
FT_Byte* end = line + pitch;
+
if ( shift > 0 )
{
- write[0] = (FT_Byte)(write[0] & mask);
+ write[0] = (FT_Byte)( write[0] & mask );
write++;
}
- if (write < end)
+ if ( write < end )
FT_MEM_ZERO( write, end-write );
}
}
+
return FT_Err_Ok;
}
@@ -174,7 +178,7 @@
if ( bitmap->pitch > 0 )
{
- FT_Int len = (width*bpp + 7) >> 3;
+ FT_Int len = ( width * bpp + 7 ) >> 3;
for ( i = 0; i < bitmap->rows; i++ )
@@ -183,7 +187,7 @@
}
else
{
- FT_Int len = (width*bpp + 7) >> 3;
+ FT_Int len = ( width * bpp + 7 ) >> 3;
for ( i = 0; i < bitmap->rows; i++ )