[poppler] GfxGouraudTriangleShading::getTriangle assert failure

Albert Astals Cid aacid at kde.org
Sat Dec 8 09:47:52 PST 2012


El Dissabte, 8 de desembre de 2012, a les 17:27:51, Harry Roberts va escriure:
> Hi,
> 
> I have a PDF which raises assertion error in `
> GfxGouraudTriangleShading::getTriangle`.
> 
> This assertion doesn't make sense, isParameterized() check if `nFuncs > 0`,
> but the code handles both cases.

Christian do you remember why you added that assert?

> 
> When disabling the assertion the PDF appears to render correctly.

Can we have such PDF?

Albert

> 
> GfxState.cc line 4481
> ---------------------------------------------------------------------
> 
>   assert(!isParameterized());
> 
>   v = triangles[i][0];
>   *x0 = vertices[v].x;
>   *y0 = vertices[v].y;
>   if (nFuncs > 0) {
>     in = colToDbl(vertices[v].color.c[0]);
>     for (j = 0; j < nFuncs; ++j) {
>       funcs[j]->transform(&in, &out[j]);
>     }
>     for (j = 0; j < gfxColorMaxComps; ++j) {
>       color0->c[j] = dblToCol(out[j]);
>     }
>   } else {
>     *color0 = vertices[v].color;
>   }
> 
> 
> ---------------------------------------------------------------------
> 
> 
> Cheers,
> 
>  - Harry


More information about the poppler mailing list