fixed a bug which prevented the raster from correctly performing horizontal dropout control..
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
diff --git a/src/base/ftraster.c b/src/base/ftraster.c
index e5eb7e9..d70800f 100644
--- a/src/base/ftraster.c
+++ b/src/base/ftraster.c
@@ -3307,7 +3307,9 @@
{
b = bits[0];
if (b < 127) b++;
- bits[0] = (64-x1) + (b >> 1);
+ b = (Byte)((64-x1) + (b >> 1));
+ /* if (b < 32) b = 32; */
+ bits[0] = b;
if ( ras.precision > 64 )
{
@@ -3331,14 +3333,18 @@
bits += incr;
b = bits[0];
if (b < 127) b++;
- bits[0] = (Byte)(x2 + (b >> 1));
+ b = (Byte)(x2 + (b >> 1));
+ /* if (b < 32) b = 32; */
+ bits[0] = b;
}
}
else
{
b = bits[0];
if (b < 127) b++;
- bits[0] = (Byte)((b >> 1)+(x2-x1));
+ b = (Byte)((b >> 1)+(x2-x1));
+ /* if (b < 32) b = 32; */
+ bits[0] = b;
}
}
}
@@ -3411,9 +3417,8 @@
color += *pixel;
if (color < 64)
color = 64;
-/*
+
*pixel = (color >= 127 ? 127 : (unsigned char)color );
- */
}
}