W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css3-images] [css3-values] Inconsistent Angles

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 07 Sep 2010 20:04:49 -0700
Message-ID: <4C86FD51.3000300@inkedblade.net>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: David Singer <singer@apple.com>, Simon Fraser <smfr@me.com>, "www-style@w3.org" <www-style@w3.org>
On 09/07/2010 06:09 PM, Tab Atkins Jr. wrote:
> On Tue, Sep 7, 2010 at 5:47 PM, David Singer<singer@apple.com>  wrote:
>> why isn't the starting point for a radial linear gradient
>> "those point(s) on a line perpendicular to the gradient angle,
>> in the most negative position possible, that still just fit(s)
>> within the shape to be filled"?
>
> I can't understand what you're trying to say here.

He's saying what you're saying, just generalizing it so you don't need
different rules depending on the angle's value.

Here's the idea: You have an angle. You want a gradient.

1. Draw a directed line at that angle.
2. Place it over the centerpoint of the box. Call this point zero.
3. Draw a line perpendicular to the line.
4. Shift the line backwards (i.e. negatively) until the line's
    intersection with the directed line is as negative as possible
    while still intersecting the box.

The intersection point in step 4 is the start point of the gradient.

~fantasai
Received on Wednesday, 8 September 2010 03:05:25 GMT

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