summaryrefslogtreecommitdiffstats
path: root/src/autofit/afangles.c
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2015-06-09 16:35:08 -0700
committerAbhisek Devkota <ciwrl@cyanogenmod.com>2015-08-19 11:42:11 -0700
commita3a6685e80688af254c5c23a62a2f3b0bcef5e5f (patch)
tree7e67208cafc4572557e8d10469fb5dc173ca2edf /src/autofit/afangles.c
parent6bb07037be23a1523b3af5b1be5432bd4ccf22b7 (diff)
downloadandroid_external_freetype-stable/cm-11.0-XNG3C.tar.gz
android_external_freetype-stable/cm-11.0-XNG3C.tar.bz2
android_external_freetype-stable/cm-11.0-XNG3C.zip
Update to freetype 2.6.0stable/cm-11.0-XNG3C
Bug 18751561 RM-154 Change-Id: Ia8c081f8fd38a1f78c72d30234c5ace8cfffe6a9 (cherry picked from commit c341565733345bef8ebe68db3c175301afe4ec97)
Diffstat (limited to 'src/autofit/afangles.c')
-rw-r--r--src/autofit/afangles.c64
1 files changed, 2 insertions, 62 deletions
diff --git a/src/autofit/afangles.c b/src/autofit/afangles.c
index b44a5ba..1b1eb31 100644
--- a/src/autofit/afangles.c
+++ b/src/autofit/afangles.c
@@ -5,7 +5,7 @@
/* Routines used to compute vector angles with limited accuracy */
/* and very high speed. It also contains sorting routines (body). */
/* */
-/* Copyright 2003-2006, 2011-2012 by */
+/* Copyright 2003-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,66 +20,6 @@
#include "aftypes.h"
-#if 0
-
- FT_LOCAL_DEF( FT_Int )
- af_corner_is_flat( FT_Pos x_in,
- FT_Pos y_in,
- FT_Pos x_out,
- FT_Pos y_out )
- {
- FT_Pos ax = x_in;
- FT_Pos ay = y_in;
-
- FT_Pos d_in, d_out, d_corner;
-
-
- if ( ax < 0 )
- ax = -ax;
- if ( ay < 0 )
- ay = -ay;
- d_in = ax + ay;
-
- ax = x_out;
- if ( ax < 0 )
- ax = -ax;
- ay = y_out;
- if ( ay < 0 )
- ay = -ay;
- d_out = ax + ay;
-
- ax = x_out + x_in;
- if ( ax < 0 )
- ax = -ax;
- ay = y_out + y_in;
- if ( ay < 0 )
- ay = -ay;
- d_corner = ax + ay;
-
- return ( d_in + d_out - d_corner ) < ( d_corner >> 4 );
- }
-
-
- FT_LOCAL_DEF( FT_Int )
- af_corner_orientation( FT_Pos x_in,
- FT_Pos y_in,
- FT_Pos x_out,
- FT_Pos y_out )
- {
- FT_Pos delta;
-
-
- delta = x_in * y_out - y_in * x_out;
-
- if ( delta == 0 )
- return 0;
- else
- return 1 - 2 * ( delta < 0 );
- }
-
-#endif /* 0 */
-
-
/*
* We are not using `af_angle_atan' anymore, but we keep the source
* code below just in case...
@@ -319,7 +259,7 @@
sum += table[j].org;
table[j].org = 0;
}
- table[cur_idx].org = sum / j;
+ table[cur_idx].org = sum / (FT_Pos)j;
if ( i < *count - 1 )
{