[raster] Add undocumented drop-out rule to the other bbox side also. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement it.
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
diff --git a/ChangeLog b/ChangeLog
index 06c4623..e5b6d36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-01-13 Werner Lemberg <wl@gnu.org>
+ [raster] Add undocumented drop-out rule to the other bbox side also.
+
+ * src/raster/ftraster.c (Vertical_Sweep_Drop,
+ Horizontal_Sweep_Drop): Implement it.
+
+2011-01-13 Werner Lemberg <wl@gnu.org>
+
[raster] Reduce jitter value.
This catches a rendering problem with glyph `x' from Tahoma at
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 92f65fc..55e2d0d 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2426,9 +2426,12 @@
}
/* undocumented but confirmed: If the drop-out would result in a */
- /* pixel outside of the bounding box, use the right pixel instead */
+ /* pixel outside of the bounding box, use the pixel inside of the */
+ /* bounding box instead */
if ( pxl < 0 )
pxl = e1;
+ else if ( TRUNC( pxl ) >= ras.bWidth )
+ pxl = e2;
/* check that the other pixel isn't set */
e1 = pxl == e1 ? e2 : e1;
@@ -2606,10 +2609,13 @@
return; /* no drop-out control */
}
- /* undocumented but confirmed: If the drop-out would result in a */
- /* pixel outside of the bounding box, use the top pixel instead */
+ /* undocumented but confirmed: If the drop-out would result in a */
+ /* pixel outside of the bounding box, use the pixel inside of the */
+ /* bounding box instead */
if ( pxl < 0 )
pxl = e1;
+ else if ( TRUNC( pxl ) >= ras.target.rows )
+ pxl = e2;
/* check that the other pixel isn't set */
e1 = pxl == e1 ? e2 : e1;