Hi,<div><br></div><div>I have a PDF which raises assertion error in `<span style="background-color:rgb(255,255,255);font-size:13px">GfxGouraudTriangleShading::getTriangle`.</span></div><div><span style="background-color:rgb(255,255,255);font-size:13px"><br>
</span></div><div><span style="background-color:rgb(255,255,255);font-size:13px">This assertion doesn't make sense, isParameterized() check if `nFuncs > 0`, but the code handles both cases.</span></div><div><span style="background-color:rgb(255,255,255);font-size:13px"><br>
</span></div><div><span style="background-color:rgb(255,255,255);font-size:13px">When disabling the assertion the PDF appears to render correctly.</span></div><div><br></div><div>GfxState.cc line 4481<br></div><div>---------------------------------------------------------------------</div>
<div><br></div><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:13px;background-color:rgb(255,255,255)"><code> 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;
}</code></pre><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:13px;background-color:rgb(255,255,255)"><code><br></code></pre><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:13px;background-color:rgb(255,255,255)">
<code><span style="font-family:arial;font-size:small;white-space:normal">-----------------------</span><span style="font-family:arial;font-size:small;white-space:normal">-----------------------</span><span style="font-family:arial;font-size:small;white-space:normal">-----------------------</span></code></pre>
<pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:13px;background-color:rgb(255,255,255)"><code><span style="font-family:arial;font-size:small;white-space:normal"><br></span></code></pre><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:13px;background-color:rgb(255,255,255)">
<code><span style="font-family:arial;font-size:small;white-space:normal">Cheers,</span></code></pre><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:13px;background-color:rgb(255,255,255)"><code><span style="font-family:arial;font-size:small;white-space:normal"> - Harry</span></code></pre>