From 0039d0120e08bdcbe88dac66f65003d3ed5251b4 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 14 Jan 2011 19:44:29 +0100 Subject: [PATCH] [raster] Add undocumented drop-out rule to the other bbox side also. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement it. --- ChangeLog | 7 +++++++ src/raster/ftraster.c | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06c46236f..e5b6d3648 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-01-13 Werner Lemberg + + [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 [raster] Reduce jitter value. diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 92f65fc77..55e2d0d75 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;