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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
diff --git a/ChangeLog b/ChangeLog
index 5ef3e6f..2776d70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
Fix Savannah bug #26600.
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 6724e8f..a5cc40c 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2230,7 +2230,7 @@ a };
break;
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;
case 1: /* simple drop-outs excluding stubs */
@@ -2276,7 +2276,7 @@ a };
if ( ras.dropOutControl == 1 )
pxl = e2;
else
- pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half );
+ pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break;
default: /* modes 2, 3, 6, 7 */
@@ -2425,7 +2425,7 @@ a };
break;
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;
case 1: /* simple drop-outs excluding stubs */
@@ -2443,7 +2443,7 @@ a };
if ( ras.dropOutControl == 1 )
pxl = e2;
else
- pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half );
+ pxl = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break;
default: /* modes 2, 3, 6, 7 */
@@ -2675,7 +2675,7 @@ a };
break;
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;
case 1: /* simple drop-outs excluding stubs */
@@ -2693,7 +2693,7 @@ a };
if ( ras.dropOutControl == 1 )
e1 = e2;
else
- e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half );
+ e1 = FLOOR( ( x1 + x2 + 1 ) / 2 + ras.precision_half - 1 );
break;