[cairo] Under-specified gradients (was: cairo pattern/glitz patches)
Carl Worth
cworth at cworth.org
Thu Feb 24 13:47:42 PST 2005
On Fri, 18 Feb 2005 16:06:39 -0500, David Reveman wrote:
> I've split up my pending pattern updates and glitz backend updates as
> much as possible. Here's a set of patches. They need to be applied in
> the following order:
I'm starting to work through these now.
> cairo-surface-fallback-fix-1.diff
This one I committed earlier (as mentioned here before).
> cairo-gstate-pattern-init-1.diff
I just committed this one today with some minor cleanups.
> cairo-gstate-pattern-copy-show-1.diff
I've run into a functional change with this one. It looks like the
issue is with a removed optimization that turned a gradient with a
single color stop into a solid pattern (when copying).
Apparently, a gradient with a single color stop is not treated as a
solid pattern of the color in the only color stop, and it seems that
that would be the most reasonable behavior.
Actually, there's a slightly more general form of the question here.
I've been assuming that we want a default extend of EXTEND_TRANSPARENT
for all patterns. So outside of the [0..1] range, gradients are
transparent unless the user requests otherwise.
But, within the [0..1] range, we know to do linear interpolation
between color stops. But what to do when the provided color stops do
not reach 0.0 or 1.0? I propose that the nearest color stop value
should be used, (and this behavior should be independent of the extend
parameter).
This specification would yield the desired behavior for
single-color-stop-gradients, (namely, that they are a solid color
within the [0..1] range).
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050224/397193c5/attachment.pgp
More information about the cairo
mailing list