Comment 49 for bug 168610

Revision history for this message
In , Carlos Garcia Campos (carlosgc) wrote :

(In reply to comment #25)
> You mean they fail with new patch or failed with old patch work with new one?

yes, they don't work with the patch.

> Both work on Splash BTW

sure

> Also
>
> @@ -2751,12 +2763,13 @@ void Gfx::doRadialShFill(GfxRadialShading *shading) {
> ya = y0 + sa * (y1 - y0);
> ra = r0 + sa * (r1 - r0);
> if (ta < t0) {
> - shading->getColor(t0, &colorA);
> + tt = t0;
> } else if (ta > t1) {
> - shading->getColor(t1, &colorA);
> + tt = t1;
> } else {
> - shading->getColor(ta, &colorA);
> + tt = ta;
> }
> + shading->getColor(tt, &colorA);
>
> // fill the circles
> while (ia < radialMaxSplits) {
>
> looks like an unneeded change
>

tt is used again below, without this change I would have to check again if ta < t1 or ta > t1, and so on.

I think the problem with the patch is the offset calculation for cairo_pattern_add_color_stop but I don't know how to do it right yet.