From d5545b24ea7d84d676d44d9a561f40a29221b377 Mon Sep 17 00:00:00 2001 From: Henry Stiles Date: Thu, 13 May 2010 03:25:44 +0000 Subject: Fixes bug #690877, update the PXL default fill algorithm to use any-part-of-pixel not center-of-pixel. Unfortunately we expect differences in most the pxl test files with this change. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11231 a1074d23-0009-0410-80fe-cf8c14f379e6 --- pxl/pxgstate.c | 3 +-- pxl/pxpaint.c | 17 ----------------- 2 files changed, 1 insertion(+), 19 deletions(-) (limited to 'pxl') diff --git a/pxl/pxgstate.c b/pxl/pxgstate.c index 2255141d5..fcbca0669 100644 --- a/pxl/pxgstate.c +++ b/pxl/pxgstate.c @@ -247,8 +247,7 @@ px_initgraphics(px_state_t *pxs) px_gstate_reset(pxs->pxgs); gs_initgraphics(pgs); - /* PCL XL uses the center-of-pixel rule. */ - gs_setfilladjust(pgs, 0.0, 0.0); + gs_setfilladjust(pgs, 0.5, 0.5); { gs_point inch; float dpi; diff --git a/pxl/pxpaint.c b/pxl/pxpaint.c index c233696d7..b70188e08 100644 --- a/pxl/pxpaint.c +++ b/pxl/pxpaint.c @@ -442,22 +442,6 @@ paint_path(px_state_t *pxs, bool reset) need_restore_rop = true; } pxs->have_page = true; - /* - * The H-P printers thicken very thin strokes slightly. - * We do the same here. - */ - { - float width = gs_currentlinewidth(pgs); - gs_matrix mat; - float sx, sy; - - gs_currentmatrix(pgs, &mat); - sx = fabs(mat.xx) + fabs(mat.xy); - sy = fabs(mat.yx) + fabs(mat.yy); - width *= min(sx, sy); - if ( width < 5 ) - gs_setfilladjust(pgs, 0.5, 0.5); - } if ( (code = px_set_paint(&pxgs->pen, pxs)) < 0 || (code = gs_stroke(pgs)) < 0 ) @@ -466,7 +450,6 @@ paint_path(px_state_t *pxs, bool reset) gs_setrasterop(pgs, save_rop); gs_settexturetransparent(pgs, save_transparent); } - gs_setfilladjust(pgs, 0.0, 0.0); } rx: if ( save_path ) { gx_path_assign_free(ppath, save_path); /* path without a Current point! */ -- cgit v1.2.3