[cairo-bugs] [Bug 40918] Radial gradients misrendered if focus is exactly on the outer circle

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Sep 17 16:58:59 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=40918

--- Comment #13 from Krzysztof Kosiński <tweenk.pl at gmail.com> 2011-09-17 16:58:57 PDT ---
(In reply to comment #10)
> It is possible, but the application should be doing it, not cairo (cairo has no
> means to know whether you wanted the focus point to be inside or outside the
> circle, it just tries to respect the input).
> The application could move the focus point slightly inside the outer circle in
> order to (try to) avoid the rounding issues, but the problem is ill-conditioned
> when the focus is almost on the outer circle, so the behavior you see is
> actually the expected one.

In order to reliably do this, I have to know how large the gradient will be
when rendered - I have to move the focus point inside the outer circle by about
half of a screen pixel. But I do not know the pixel size of the gradient when
creating it.

I would much prefer if the behavior of Cairo was explicitly defined in this
case, rather effectively left undefined.

> Anyway, could you please try to describe the extend mode you would like to add
> and what the behavior for a radial gradient in generic position would be? Would
> this new extend mode also provide a new rasterization type for other pattern
> types as well?

The new extend mode would be identical to CAIRO_EXTEND_PAD for all patterns
except radial gradients and it would fill the half-plane which is now left
transparent with the color of the outer circle.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list