ref: 72e976d41565bdae7025cb4fda4f25acec92b022
parent: fa22ec1cfba5975c0622e374f8506c742d3f8d18
author: Alexei Podtelezhnikov <[email protected]>
date: Tue Nov 27 16:18:34 EST 2012
[ftstroke] Minor improvement. * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with FT_MulDiv.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-11-27 Alexei Podtelezhnikov <[email protected]>
+
+ [ftstroke] Minor improvement.
+
+ * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with
+ FT_MulDiv.
+
2012-11-17 Werner Lemberg <[email protected]>
* src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work.
--- 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;