[Poppler-bugs] [Bug 27482] Colorizing text and masks in pattern colorspace

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 9 01:12:04 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=27482

--- Comment #4 from Carlos Garcia Campos <carlosgc at gnome.org> 2010-04-09 01:12:04 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > I've noticed that you use out->restoreState(state); several times in Gfx.cc,
> > why not using Gfx::restoreState, and it doesn't seem to be a previous
> > saveState() for any of them. Is it really needed? output devs already call
> > save/restore in beginTextObject/endTextObject
> 
> Hi Carlos!
> 
> Three questions in one :-) 
> a) why using out->restoreState? 
> The implementation in SplashOutputDev and PSOutputDev is in the way, that image
> masks or text is set as clipping path, therefore in starting text or image mask
> colorizing need to save the state (in the output device) for later remove the
> clipping path again correctly. Of cource I could use there the Gfx::saveState,
> but I need only to save the state in the ouptut device.

then I think it should be called from the outputdice rather than from Gfx.cc

> After filling the clipping path with doPatternFill, we have to remove the
> clipping path, and that is done by out->restoreState.

but doPatternFill already uses save/restore

> b) where is out->saveState?
> It is done, when recognized that text or an image mask has to be set in pattern
> colorspace, Gfx remembers this in setting either textHaveCSPattern or
> maskHaveCSPattern to gTrue only if the output device supports it, colorspace is
> pattern colorspace AND output device calls it own saveState.

so we are calling save from the output device and restore from Gfx?

> c) why not using Gfx::restoreState
> I thought it was clearer, when calling out->saveState in the implementation,
> just calling out->restoreState to remove clipping path again.

do you mean you only need to save/restore the clipping path?

> Best regards,
> Thomas

By the way, I've noticed that adrianj patch to implement it in cairo output
device doesn't change drawImageMask, so we are still drawing the image mask
instead of setting a new softmask in that case. Do you have a test case where
that makes a difference?

Thanks!

-- 
Configure bugmail: https://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