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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 2 02:50:08 PST 2009


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





--- Comment #16 from thomasf <Thomas.Freitag at alfa.de>  2009-02-02 02:50:07 PST ---
(In reply to comment #14)
> Some more comments: 
>  state->setRender(7); <-- sucks a bit
>  state->setRender(7 /* Set foo bar */); <-- would be much more nice :-)

Okay. The trick is to use the text as clipping path and fill it later on with
the appropriate colorspace. Therefore I need here to set the render at least to
4.

> 
> I see that in 
>  Gfx::opEndText
> you do 
>  out->restoreState(state);
> but you are also doing it in SplashOutputDev::endTextObject that also gets
> called by Gfx::opEndText so i'm not sure if that's really needed, also might be
> that i'm not totally understanding what the code does :D

restoreState in SplashOutputDev::endTextObject will be done only if something
goes wrong:
if state->getFillColorSpace()->getMode() != csPattern at end of the text, no
filling could be done, but at start of text the state was saved. So we have to
restore it either in this case.
I had that with one of the pdfs I load up: inside setting the text colorspace
and fill color was already changed for later use! That was the reason why I
remember this change of colorspace in colorSpaceText but will not submit that
immediately but after successfully fill the text.


-- 
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