summaryrefslogtreecommitdiff
path: root/gs/src/gxshade1.c
diff options
context:
space:
mode:
authorRaph Levien <raph.levien@artifex.com>2000-10-30 22:16:04 +0000
committerRaph Levien <raph.levien@artifex.com>2000-10-30 22:16:04 +0000
commitc44b8cc20990109f9af24fe92e790db960f76c56 (patch)
tree829c7de83ea118bdaa3c6b246f9df43d808fc93c /gs/src/gxshade1.c
parentdde8c6227d5c237be8a305d303f20f3eab1fcd1d (diff)
Implements correct pixround logic in shade_fill_device_rectangle;
previous commit had inadvertently left out part of the logic. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@843 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gxshade1.c')
-rw-r--r--gs/src/gxshade1.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gs/src/gxshade1.c b/gs/src/gxshade1.c
index a891874fc..a237459b0 100644
--- a/gs/src/gxshade1.c
+++ b/gs/src/gxshade1.c
@@ -70,9 +70,14 @@ shade_fill_device_rectangle(const shading_fill_state_t * pfs,
else
ymin = p1->y, ymax = p0->y;
+ /* See gx_default_fill_path for an explanation of the tweak below. */
xmin -= pis->fill_adjust.x;
+ if (pis->fill_adjust.x == fixed_half)
+ xmin += fixed_epsilon;
xmax += pis->fill_adjust.x;
ymin -= pis->fill_adjust.y;
+ if (pis->fill_adjust.y == fixed_half)
+ ymin += fixed_epsilon;
ymax += pis->fill_adjust.y;
x = fixed2int_var_pixround(xmin);
y = fixed2int_var_pixround(ymin);