Improve b/w rasterizer.

Problem reported by Krzysztof Kotlenga <pocek@users.sf.net>.

* src/raster/raster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
Horizontal_Gray_Sweep_Drop): For smart drop-out mode, if
intersections are equally distant relative to next pixel center,
select the left pixel, not the right one.
This commit is contained in:
Werner Lemberg 2009-05-22 09:20:25 +02:00
parent b72af52b9c
commit 19fbc576af
2 changed files with 16 additions and 6 deletions

View File

@ -1,3 +1,13 @@
2009-05-22 Werner Lemberg <wl@gnu.org>
Improve b/w rasterizer.
Problem reported by Krzysztof Kotlenga <pocek@users.sf.net>.
* src/raster/raster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
Horizontal_Gray_Sweep_Drop): For smart drop-out mode, if
intersections are equally distant relative to next pixel center,
select the left pixel, not the right one.
2009-05-19 Werner Lemberg <wl@gnu.org> 2009-05-19 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #26600. Fix Savannah bug #26600.

View File

@ -2230,7 +2230,7 @@ a };
break; break;
case 4: /* smart drop-outs including stubs */ case 4: /* smart drop-outs including stubs */
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half ); pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break; break;
case 1: /* simple drop-outs excluding stubs */ case 1: /* simple drop-outs excluding stubs */
@ -2276,7 +2276,7 @@ a };
if ( ras.dropOutControl == 1 ) if ( ras.dropOutControl == 1 )
pxl = e2; pxl = e2;
else else
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half ); pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break; break;
default: /* modes 2, 3, 6, 7 */ default: /* modes 2, 3, 6, 7 */
@ -2425,7 +2425,7 @@ a };
break; break;
case 4: /* smart drop-outs including stubs */ case 4: /* smart drop-outs including stubs */
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half ); pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break; break;
case 1: /* simple drop-outs excluding stubs */ case 1: /* simple drop-outs excluding stubs */
@ -2443,7 +2443,7 @@ a };
if ( ras.dropOutControl == 1 ) if ( ras.dropOutControl == 1 )
pxl = e2; pxl = e2;
else else
pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half ); pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break; break;
default: /* modes 2, 3, 6, 7 */ default: /* modes 2, 3, 6, 7 */
@ -2675,7 +2675,7 @@ a };
break; break;
case 4: /* smart drop-outs including stubs */ case 4: /* smart drop-outs including stubs */
e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half ); e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break; break;
case 1: /* simple drop-outs excluding stubs */ case 1: /* simple drop-outs excluding stubs */
@ -2693,7 +2693,7 @@ a };
if ( ras.dropOutControl == 1 ) if ( ras.dropOutControl == 1 )
e1 = e2; e1 = e2;
else else
e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half ); e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break; break;