diff options
author | marha <marha@users.sourceforge.net> | 2009-12-22 14:14:24 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-12-22 14:14:24 +0000 |
commit | 4284aeba874b9168f2228c59639bec8346a56796 (patch) | |
tree | d51ffb4507e0cae24b0875d8bb6b2c037829a684 /freetype/src/psaux/psobjs.c | |
parent | c438f190eedc71ee8dd14e14fec660e98d3dc0bf (diff) | |
parent | 0695dfb71ca6fe132d15a4d0890e8a868183adf9 (diff) | |
download | vcxsrv-4284aeba874b9168f2228c59639bec8346a56796.tar.gz vcxsrv-4284aeba874b9168f2228c59639bec8346a56796.tar.bz2 vcxsrv-4284aeba874b9168f2228c59639bec8346a56796.zip |
svn merge ^/branches/released
Diffstat (limited to 'freetype/src/psaux/psobjs.c')
-rw-r--r-- | freetype/src/psaux/psobjs.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/freetype/src/psaux/psobjs.c b/freetype/src/psaux/psobjs.c index b47c3433d..35644aee9 100644 --- a/freetype/src/psaux/psobjs.c +++ b/freetype/src/psaux/psobjs.c @@ -19,6 +19,7 @@ #include <ft2build.h> #include <freetype/internal/psaux.h> #include <freetype/internal/ftdebug.h> +#include <freetype/internal/ftcalc.h> #include "psobjs.h" #include "psconv.h" @@ -564,8 +565,8 @@ cur++; if ( cur >= limit || *cur != '>' ) /* >> */ { - FT_ERROR(( "ps_parser_skip_PS_token: " - "unexpected closing delimiter `>'\n" )); + FT_ERROR(( "ps_parser_skip_PS_token:" + " unexpected closing delimiter `>'\n" )); error = PSaux_Err_Invalid_File_Format; goto Exit; } @@ -590,9 +591,10 @@ Exit: if ( cur == parser->cursor ) { - FT_ERROR(( "ps_parser_skip_PS_token: " - "current token is `%c', which is self-delimiting " - "but invalid at this point\n", + FT_ERROR(( "ps_parser_skip_PS_token:" + " current token is `%c' which is self-delimiting\n" + " " + " but invalid at this point\n", *cur )); error = PSaux_Err_Invalid_File_Format; @@ -1153,8 +1155,10 @@ } else { - FT_ERROR(( "ps_parser_load_field: expected a name or string " - "but found token of type %d instead\n", + FT_ERROR(( "ps_parser_load_field:" + " expected a name or string\n" + " " + " but found token of type %d instead\n", token.type )); error = PSaux_Err_Invalid_File_Format; goto Exit; @@ -1191,8 +1195,8 @@ if ( result < 0 ) { - FT_ERROR(( "ps_parser_load_field: " - "expected four integers in bounding box\n" )); + FT_ERROR(( "ps_parser_load_field:" + " expected four integers in bounding box\n" )); error = PSaux_Err_Invalid_File_Format; goto Exit; } @@ -1309,7 +1313,7 @@ FT_LOCAL_DEF( FT_Error ) ps_parser_to_bytes( PS_Parser parser, FT_Byte* bytes, - FT_Long max_bytes, + FT_Offset max_bytes, FT_Long* pnum_bytes, FT_Bool delimiters ) { @@ -1551,16 +1555,9 @@ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; - if ( builder->shift ) - { - x >>= 16; - y >>= 16; - } - point->x = x; - point->y = y; + point->x = FIXED_TO_INT( x ); + point->y = FIXED_TO_INT( y ); *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC ); - - builder->last = *point; } outline->n_points++; } @@ -1668,8 +1665,8 @@ if ( outline->n_contours > 0 ) { - /* Don't add contours only consisting of one point, i.e., */ - /* check whether begin point and last point are the same. */ + /* Don't add contours only consisting of one point, i.e., */ + /* check whether the first and the last point is the same. */ if ( first == outline->n_points - 1 ) { outline->n_contours--; |