forked from minhngoc25a/freetype2
Simplify math.
Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop): Do it.
This commit is contained in:
parent
90c699af0c
commit
2f2b780e00
|
@ -1,3 +1,11 @@
|
|||
2009-06-07 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
Simplify math.
|
||||
Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
|
||||
|
||||
* src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
|
||||
Horizontal_Gray_Sweep_Drop): Do it.
|
||||
|
||||
2009-06-04 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
Preparation for fixing scan conversion rules 4 and 6.
|
||||
|
|
|
@ -2229,7 +2229,7 @@
|
|||
break;
|
||||
|
||||
case 4: /* smart drop-outs including stubs */
|
||||
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
|
||||
pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );
|
||||
break;
|
||||
|
||||
case 1: /* simple drop-outs excluding stubs */
|
||||
|
@ -2275,7 +2275,7 @@
|
|||
if ( ras.dropOutControl == 1 )
|
||||
pxl = e2;
|
||||
else
|
||||
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
|
||||
pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );
|
||||
break;
|
||||
|
||||
default: /* modes 2, 3, 6, 7 */
|
||||
|
@ -2424,7 +2424,7 @@
|
|||
break;
|
||||
|
||||
case 4: /* smart drop-outs including stubs */
|
||||
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
|
||||
pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );
|
||||
break;
|
||||
|
||||
case 1: /* simple drop-outs excluding stubs */
|
||||
|
@ -2442,7 +2442,7 @@
|
|||
if ( ras.dropOutControl == 1 )
|
||||
pxl = e2;
|
||||
else
|
||||
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
|
||||
pxl = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );
|
||||
break;
|
||||
|
||||
default: /* modes 2, 3, 6, 7 */
|
||||
|
@ -2674,7 +2674,7 @@
|
|||
break;
|
||||
|
||||
case 4: /* smart drop-outs including stubs */
|
||||
e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
|
||||
e1 = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );
|
||||
break;
|
||||
|
||||
case 1: /* simple drop-outs excluding stubs */
|
||||
|
@ -2692,7 +2692,7 @@
|
|||
if ( ras.dropOutControl == 1 )
|
||||
e1 = e2;
|
||||
else
|
||||
e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
|
||||
e1 = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half );
|
||||
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue