diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2019-08-27 15:54:36 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2019-08-27 17:58:59 +0100 |
commit | 0d46b4f51b5efba7e72b7d45517d0fba642477aa (patch) | |
tree | 3e035a3acde53b7f7ab2afde0da201da34cb15c0 | |
parent | 42f386a85d3998310f0317501b54780ffbe6dc6b (diff) | |
download | ghostpdl-0d46b4f51b5efba7e72b7d45517d0fba642477aa.tar.gz |
Exit early from gx_shade_trapezoid in more cases.
A zero height trap isn't plotted, so we can bail out early in
that case.
-rw-r--r-- | base/gxshade6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/base/gxshade6.c b/base/gxshade6.c index 890a1ac13..337e79c70 100644 --- a/base/gxshade6.c +++ b/base/gxshade6.c @@ -976,7 +976,7 @@ gx_shade_trapezoid(patch_fill_state_t *pfs, const gs_fixed_point q[4], ytop = re.end.y; re.end.x = xleft; } - if (ybot > ytop) + if (ybot >= ytop) return 0; /* Follow the edges in, so that le.start.y == ybot etc. */ if (le.start.y < ybot) { @@ -1039,7 +1039,7 @@ gx_shade_trapezoid(patch_fill_state_t *pfs, const gs_fixed_point q[4], (int64_t)(le.start.x-le.end.x)); le.start.x = re.start.x; } - if (ybot > ytop) + if (ybot >= ytop) return 0; le.start.y = ybot; re.start.y = ybot; @@ -1056,7 +1056,7 @@ gx_shade_trapezoid(patch_fill_state_t *pfs, const gs_fixed_point q[4], (int64_t)(le.end.x-le.start.x)); le.end.x = re.end.x; } - if (ybot > ytop) + if (ybot >= ytop) return 0; le.end.y = ytop; re.end.y = ytop; |