[ftstroke] Minor improvement.

* src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with
FT_MulDiv.
This commit is contained in:
Alexei Podtelezhnikov 2012-11-27 21:18:34 -05:00
parent fa22ec1cfb
commit 72e976d415
2 changed files with 11 additions and 5 deletions

View File

@ -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.

View File

@ -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;