X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FGfx.cc;h=e86d6b1e2865e173d1d7718a1c612cb6fb48ed0b;hb=37a3dacfc10c7cf5cdcec652cbd0c3f515a16c32;hp=4f9142c09e70b5dacaf3344d379f20a406ab8d33;hpb=ff0eecc9f0cbe4ecdaac00b5b04660777ad7c630;p=swftools.git diff --git a/pdf2swf/xpdf/Gfx.cc b/pdf2swf/xpdf/Gfx.cc index 4f9142c..e86d6b1 100644 --- a/pdf2swf/xpdf/Gfx.cc +++ b/pdf2swf/xpdf/Gfx.cc @@ -1581,6 +1581,8 @@ void Gfx::doFunctionShFill1(GfxFunctionShading *shading, // center of the rectangle xM = 0.5 * (x0 + x1); yM = 0.5 * (y0 + y1); + + out->useGradients(); // the four corner colors are close (or we hit the recursive limit) // -- fill the rectangle; but require at least one subdivision @@ -1799,6 +1801,9 @@ void Gfx::doAxialShFill(GfxAxialShading *shading) { vy0 = ty + sMax * dx; i = 0; + if(i < axialMaxSplits) + out->useGradients(); + while (i < axialMaxSplits) { // bisect until color difference is small enough or we hit the @@ -2009,6 +2014,9 @@ void Gfx::doRadialShFill(GfxRadialShading *shading) { shading->getColor(ta, &colorA); } + if(ia < radialMaxSplits) + out->useGradients(); + while (ia < radialMaxSplits) { // go as far along the t axis (toward t1) as we can, such that the