mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-04 22:28:02 +02:00
* src/raster/ftraster.c (Line_Up): Use 64-bit calculations.
Attempt to fix #1332.
This commit is contained in:
parent
6fa8725a41
commit
9629cc0e83
1 changed files with 7 additions and 3 deletions
|
|
@ -251,7 +251,11 @@
|
|||
/* On the other hand, SMulDiv means `Slow MulDiv', and is used typically */
|
||||
/* for clipping computations. It simply uses the FT_MulDiv() function */
|
||||
/* defined in `ftcalc.h'. */
|
||||
#define SMulDiv_No_Round FT_MulDiv_No_Round
|
||||
#ifdef FT_INT64
|
||||
#define SMulDiv( a, b, c ) (Long)( (FT_Int64)(a) * (b) / (c) )
|
||||
#else
|
||||
#define SMulDiv FT_MulDiv_No_Round
|
||||
#endif
|
||||
|
||||
/* The rasterizer is a very general purpose component; please leave */
|
||||
/* the following redefinitions there (you never know your target */
|
||||
|
|
@ -967,14 +971,14 @@
|
|||
goto Fin;
|
||||
}
|
||||
|
||||
Ix = SMulDiv_No_Round( e - y1, Dx, Dy );
|
||||
Ix = SMulDiv( e - y1, Dx, Dy );
|
||||
x1 += Ix;
|
||||
*top++ = x1;
|
||||
|
||||
if ( --size )
|
||||
{
|
||||
Ax = Dx * ( e - y1 ) - Dy * Ix; /* remainder */
|
||||
Ix = FMulDiv( ras.precision, Dx, Dy );
|
||||
Ix = SMulDiv( ras.precision, Dx, Dy );
|
||||
Rx = Dx * ras.precision - Dy * Ix; /* remainder */
|
||||
Dx = 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue