Commit ae8fc0cb authored by Adrian Johnson's avatar Adrian Johnson
Browse files

cairo: support parameterized Gouraud shading

Bug 56463
parent 3be4e835
......@@ -945,10 +945,21 @@ GBool CairoOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTrian
fill_pattern = cairo_pattern_create_mesh ();
for (i = 0; i < shading->getNTriangles(); i++) {
&x0, &y0, &color[0],
&x1, &y1, &color[1],
&x2, &y2, &color[2]);
if (shading->isParameterized()) {
double color0, color1, color2;
shading->getTriangle(i, &x0, &y0, &color0,
&x1, &y1, &color1,
&x2, &y2, &color2);
shading->getParameterizedColor(color0, &color[0]);
shading->getParameterizedColor(color1, &color[1]);
shading->getParameterizedColor(color2, &color[2]);
} else {
&x0, &y0, &color[0],
&x1, &y1, &color[1],
&x2, &y2, &color[2]);
cairo_mesh_pattern_begin_patch (fill_pattern);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment