Commit 72e976d41565bdae7025cb4fda4f25acec92b022

Alexei Podtelezhnikov 2012-11-27T21:18:34

[ftstroke] Minor improvement. * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with FT_MulDiv.

diff --git a/ChangeLog b/ChangeLog
index 3f501aa..3116bc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-11-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[ftstroke] Minor improvement.
+
+	* src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with
+	FT_MulDiv.
+
 2012-11-17  Werner Lemberg  <wl@gnu.org>
 
 	* src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work.
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index b0b77c0..fd6a0c1 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -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;