[ftlcdfil] Obey flow direction.

* src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
Handle `up' flow.
This commit is contained in:
Werner Lemberg 2014-11-21 08:03:51 +01:00
parent 644d6fab7e
commit 9154dab815
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2014-11-21 Werner Lemberg <wl@gnu.org>
[ftlcdfil] Obey flow direction.
* src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy):
Handle `up' flow.
2014-11-21 Werner Lemberg <wl@gnu.org>
* src/base/ftbitmap.c (FT_Bitmap_Convert): Improve.

View File

@ -46,6 +46,10 @@
FT_Byte* line = bitmap->buffer;
/* take care of bitmap flow */
if ( bitmap->pitch < 0 )
line -= bitmap->pitch * ( bitmap->rows - 1 );
/* `fir' and `pix' must be at least 32 bit wide, since the sum of */
/* the values in `weights' can exceed 0xFF */
@ -106,6 +110,10 @@
FT_Int pitch = bitmap->pitch;
/* take care of bitmap flow */
if ( bitmap->pitch < 0 )
column -= bitmap->pitch * ( bitmap->rows - 1 );
for ( ; width > 0; width--, column++ )
{
FT_Byte* col = column;
@ -190,6 +198,10 @@
FT_Byte* line = bitmap->buffer;
/* take care of bitmap flow */
if ( bitmap->pitch < 0 )
line -= bitmap->pitch * ( bitmap->rows - 1 );
for ( ; height > 0; height--, line += pitch )
{
FT_UInt xx;
@ -229,6 +241,10 @@
FT_Byte* column = bitmap->buffer;
/* take care of bitmap flow */
if ( bitmap->pitch < 0 )
column -= bitmap->pitch * ( bitmap->rows - 1 );
for ( ; width > 0; width--, column++ )
{
FT_Byte* col = column;