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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 2 04:44:44 PST 2009


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





--- Comment #17 from thomasf <Thomas.Freitag at alfa.de>  2009-02-02 04:44:43 PST ---
(In reply to comment #13)
> I can't count
> 
>  * patch from comment #4 memsetting looks like a workaround for a problem
> somewhere else in the code, have you tried removing the code and passing the
> program though valgrind with the problematic pdf to see if it reports anything?

I'm not sure if You're really true. If You look into the code for
GfxGouraudTriangleShading the number of components is taken from the "Decode"
dict:
    nComps = i;
Therefore later on in this function only this number of components are filled
    for (i = 0; i < nComps; ++i) {
      verticesA[nVerticesA].color.c[i] =
          dblToCol(cMin[i] + cMul[i] * (double)c[i]);
    }
The other components up to 4 are leaved unchanged, but greallocn will not
initialize these values, at least not with gcc on Solaris. But later on, when
the triangles are calculated and filled, all four color components will be
examined. (It looks fine under windows!)

>  * patch from comment #4 if you don't use the code at the moment i'll prefer
> leaving it out
>  * patch from comment #5 is the same than patch from comment #4
> 
> should be
> 
>  * patch from comment #5 memsetting looks like a workaround for a problem
> somewhere else in the code, have you tried removing the code and passing the
> program though valgrind with the problematic pdf to see if it reports anything?
>  * patch from comment #5 if you don't use the code at the moment i'll prefer
> leaving it out
>  * patch from comment #6 is the same than patch from comment #5

comment #5 and comment #6 are the same code. I agree, You can leave the changes
out. I started with this code, trying to calculate the text bounding box for
later use as clipping box to fill it with the appropiate colorspace. But I
wasn't really sure if my calculation was good enough, and in all my samples
there was a clipping box set up in the PDF I can use. So leaving that code in
could be confusing for other users. If I'll get a PDF where it would be
necessary to use a text clipping box again I can insert the code once again and
use the box at the appropriate places...


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