$NetBSD: patch-ap,v 1.1 2009/11/19 17:58:41 drochner Exp $ --- poppler/Gfx.cc.orig 2009-09-09 23:25:11.000000000 +0200 +++ poppler/Gfx.cc @@ -2462,7 +2462,10 @@ void Gfx::doAxialShFill(GfxAxialShading if (out->useFillColorStop()) { // make sure we add stop color when t = tMin state->setFillColor(&color0); - out->updateFillColorStop(state, (tt - tMin)/(tMax - tMin)); + if (tMax == tMin) + out->updateFillColorStop(state, tMin); + else + out->updateFillColorStop(state, (tt - tMin)/(tMax - tMin)); } // compute the coordinates of the point on the t axis at t = tMin; @@ -2602,9 +2605,12 @@ void Gfx::doAxialShFill(GfxAxialShading // set the color state->setFillColor(&color0); - if (out->useFillColorStop()) - out->updateFillColorStop(state, (ta[j] - tMin)/(tMax - tMin)); - else + if (out->useFillColorStop()) { + if (tMax == tMin) + out->updateFillColorStop(state, tMin); + else + out->updateFillColorStop(state, (ta[j] - tMin)/(tMax - tMin)); + } else out->updateFillColor(state); if (needExtend) {