diff options
author | marha <marha@users.sourceforge.net> | 2013-06-21 11:18:17 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-06-21 11:18:17 +0200 |
commit | 039fb6c83783fff3b92f1e7934ce4702cedb1722 (patch) | |
tree | bb971ed2e247f7d311b696e62c7ed4d66b199b6d /freetype/src/smooth/ftsmooth.c | |
parent | 84f6a75a56f4749f91a51a161c1989cbc8807b80 (diff) | |
parent | fa791414601df61d20d860299dba80fdb62565df (diff) | |
download | vcxsrv-039fb6c83783fff3b92f1e7934ce4702cedb1722.tar.gz vcxsrv-039fb6c83783fff3b92f1e7934ce4702cedb1722.tar.bz2 vcxsrv-039fb6c83783fff3b92f1e7934ce4702cedb1722.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
Upgraded freetype to 2.5.0.1
Conflicts:
freetype/src/base/ftcalc.c
freetype/src/base/ftgloadr.c
freetype/src/base/ftgxval.c
freetype/src/base/ftotval.c
freetype/src/base/ftoutln.c
freetype/src/base/ftpfr.c
freetype/src/base/fttrigon.c
freetype/src/cff/cffobjs.c
freetype/src/psaux/afmparse.c
freetype/src/psnames/psmodule.c
freetype/src/raster/ftraster.c
freetype/src/raster/ftrend1.c
freetype/src/sfnt/ttsbit.c
freetype/src/sfnt/ttsbit0.c
freetype/src/truetype/ttobjs.c
freetype/src/truetype/ttsubpix.c
freetype/src/type1/t1afm.c
Diffstat (limited to 'freetype/src/smooth/ftsmooth.c')
-rw-r--r-- | freetype/src/smooth/ftsmooth.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/freetype/src/smooth/ftsmooth.c b/freetype/src/smooth/ftsmooth.c index 7150fe9a5..a42b85fdc 100644 --- a/freetype/src/smooth/ftsmooth.c +++ b/freetype/src/smooth/ftsmooth.c @@ -4,7 +4,7 @@ /* */ /* Anti-aliasing renderer interface (body). */ /* */ -/* Copyright 2000-2006, 2009-2012 by */ +/* Copyright 2000-2006, 2009-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -60,12 +60,12 @@ const FT_Matrix* matrix, const FT_Vector* delta ) { - FT_Error error = Smooth_Err_Ok; + FT_Error error = FT_Err_Ok; if ( slot->format != render->glyph_format ) { - error = Smooth_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -108,11 +108,13 @@ #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING FT_Pos height_org, width_org; #endif - FT_Bitmap* bitmap; - FT_Memory memory; - FT_Int hmul = mode == FT_RENDER_MODE_LCD; - FT_Int vmul = mode == FT_RENDER_MODE_LCD_V; - FT_Pos x_shift, y_shift, x_left, y_top; + FT_Bitmap* bitmap = &slot->bitmap; + FT_Memory memory = render->root.memory; + FT_Int hmul = mode == FT_RENDER_MODE_LCD; + FT_Int vmul = mode == FT_RENDER_MODE_LCD_V; + FT_Pos x_shift = 0; + FT_Pos y_shift = 0; + FT_Pos x_left, y_top; FT_Raster_Params params; @@ -124,14 +126,14 @@ /* check glyph image format */ if ( slot->format != render->glyph_format ) { - error = Smooth_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } /* check mode */ if ( mode != required_mode ) { - error = Smooth_Err_Cannot_Render_Glyph; + error = FT_THROW( Cannot_Render_Glyph ); goto Exit; } @@ -157,7 +159,7 @@ FT_ERROR(( "ft_smooth_render_generic: glyph too large:" " xMin = %d, xMax = %d\n", cbox.xMin >> 6, cbox.xMax >> 6 )); - error = Smooth_Err_Raster_Overflow; + error = FT_THROW( Raster_Overflow ); goto Exit; } else @@ -168,15 +170,12 @@ FT_ERROR(( "ft_smooth_render_generic: glyph too large:" " yMin = %d, yMax = %d\n", cbox.yMin >> 6, cbox.yMax >> 6 )); - error = Smooth_Err_Raster_Overflow; + error = FT_THROW( Raster_Overflow ); goto Exit; } else height = ( cbox.yMax - cbox.yMin ) >> 6; - bitmap = &slot->bitmap; - memory = render->root.memory; - #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING width_org = width; height_org = height; @@ -238,7 +237,7 @@ { FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n", width, height )); - error = Smooth_Err_Raster_Overflow; + error = FT_THROW( Raster_Overflow ); goto Exit; } @@ -372,7 +371,7 @@ */ if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ) { - error = Smooth_Err_Invalid_Pixel_Size; + error = FT_THROW( Invalid_Pixel_Size ); goto Exit; } @@ -383,7 +382,7 @@ /* everything is fine; don't deallocate buffer */ have_buffer = FALSE; - error = Smooth_Err_Ok; + error = FT_Err_Ok; Exit: if ( have_outline_shifted ) |