[Poppler-bugs] [Bug 19670] Colorizing text in pattern colorspace solved

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 22 04:09:25 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=19670





--- Comment #48 from thomasf <Thomas.Freitag at alfa.de>  2009-05-22 04:09:24 PST ---
(In reply to comment #46)
> We are getting close!
> 
I fear, You're wrong :-(. I changed opSetFillGray in comment 35, to solve the
same regressions in SplashOutputDev, but this runs now into problems with
PSOutputDev. I could fix it in this function in the following way:

void Gfx::opSetFillGray(Object args[], int numArgs) {
  GfxColor color;

  if (textHaveCSPattern) {
          out->endTextObject(state);
          out->restoreState(state);
          state->setFillPattern(NULL);
          state->setFillColorSpace(new GfxDeviceGrayColorSpace());
          out->updateFillColorSpace(state);
          color.c[0] = dblToCol(args[0].getNum());
          state->setFillColor(&color);
          out->updateFillColor(state);
          out->beginTextObject(state);
          out->updateRender(state);
          out->updateTextMat(state);
          out->updateTextPos(state);
          textHaveCSPattern = gFalse;
  } else {
          state->setFillPattern(NULL);
          state->setFillColorSpace(new GfxDeviceGrayColorSpace());
          out->updateFillColorSpace(state);
          color.c[0] = dblToCol(args[0].getNum());
          state->setFillColor(&color);
          out->updateFillColor(state);
  }
}

but because of the regression in comment 47 and because this will not work if
text is already outputted before calling this method I had a deeper look into
it and found a solution. But: this means a complete new patch, and before I
upload the new patch, I'll run it over my "testsuite" 


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list