W3C home > Mailing lists > Public > www-style@w3.org > October 2009

Re: Comments on gradients proposal

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 23 Oct 2009 10:51:58 +1300
Message-ID: <11e306600910221451w3647d0crab8ed7c01805c6af@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style <www-style@w3.org>
The processing of gradient stops could stand some additional clarification.
I think the model is:
1) any stop with a specified position that is less than the specified
position of any stop before it has its position changed to the greatest
specified position of any stop before it.
2) *then* you interpolate the stop positions of any stops with unspecified
positions
3) for radial gradients, drawn circles/ellipses with negative radii are
ignored (negative stop values are not changed). (There may be massaging of
stops before passing to native APIs, but this is purely an implementation
detail.) This is more important if you add support for repeating gradients,
for example it should be clear that repeating-radial-gradient(white -50px,
black -25px, white 0) doesn't just set all the stops to position 0 and
render white.

I think you can deduce all that from the spec, except possibly the ordering
of steps 1) and 2), but it might be clearer if it was in one place.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
Received on Thursday, 22 October 2009 21:52:30 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:21 GMT