Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Unified Diff: src/base/ftstroke.c

Issue 89753003: Update freetype to latest version of ASOP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src/third_party/freetype.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/ftstream.c ('k') | src/base/ftsynth.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/ftstroke.c
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index 5399efe9d3a9ec8e9337c2befb794c3edd5459f4..ee61ceca0ebf96c5d2bdb6fc2de799945514eb03 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (body). */
/* */
-/* Copyright 2002-2006, 2008-2011 by */
+/* Copyright 2002-2006, 2008-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -789,13 +789,13 @@
FT_Stroker_New( FT_Library library,
FT_Stroker *astroker )
{
- FT_Error error;
+ FT_Error error; /* assigned in FT_NEW */
FT_Memory memory;
FT_Stroker stroker = NULL;
if ( !library )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
memory = library->memory;
@@ -1126,9 +1126,8 @@
middle.y += stroker->center.y;
/* compute first angle point */
- length = FT_MulFix( radius,
- FT_DivFix( 0x10000L - sigma,
- ft_pos_abs( FT_Sin( theta ) ) ) );
+ length = FT_MulDiv( radius, 0x10000L - sigma,
+ ft_pos_abs( FT_Sin( theta ) ) );
FT_Vector_From_Polar( &delta, length, phi + rotate );
delta.x += middle.x;
@@ -1495,7 +1494,7 @@
sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) );
sinB = ft_pos_abs( FT_Sin( beta - gamma ) );
- alen = FT_DivFix( FT_MulFix( blen, sinA ), sinB );
+ alen = FT_MulDiv( blen, sinA, sinB );
FT_Vector_From_Polar( &delta, alen, beta );
delta.x += start.x;
@@ -1702,7 +1701,7 @@
sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) );
sinB = ft_pos_abs( FT_Sin( beta - gamma ) );
- alen = FT_DivFix( FT_MulFix( blen, sinA ), sinB );
+ alen = FT_MulDiv( blen, sinA, sinB );
FT_Vector_From_Polar( &delta, alen, beta );
delta.x += start.x;
@@ -1955,7 +1954,7 @@
if ( !stroker || border > 1 )
{
- error = FT_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -2061,7 +2060,7 @@
if ( !outline || !stroker )
- return FT_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
FT_Stroker_Rewind( stroker );
@@ -2239,7 +2238,7 @@
return error;
Invalid_Outline:
- return FT_Err_Invalid_Outline;
+ return FT_THROW( Invalid_Outline );
}
@@ -2259,7 +2258,7 @@
FT_Stroker stroker,
FT_Bool destroy )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
FT_Glyph glyph = NULL;
FT_Library library = stroker->library;
@@ -2335,7 +2334,7 @@
FT_Bool inside,
FT_Bool destroy )
{
- FT_Error error = FT_Err_Invalid_Argument;
+ FT_Error error = FT_ERR( Invalid_Argument );
FT_Glyph glyph = NULL;
FT_Library library = stroker->library;
« no previous file with comments | « src/base/ftstream.c ('k') | src/base/ftsynth.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698