Re: Comments on gradients proposal

On Mon, Oct 19, 2009 at 11:16 PM, Robert O'Callahan
<robert@ocallahan.org> wrote:
>> The end point is the point on the gradient-line where a line drawn
>> perpendicular from that point would cross the furthest corner of the box.
>
> What if the starting point is equidistant from two "furthest corners" of the
> box?

That language may have to be cleaned up slightly.  Are you thinking of
a case like, say, a 100px by 100px box with the starting-point at 50px
50px (so the starting-point is equidistant from all corners)?  What's
intended is that the "furthest corner" is the furthest *in the
direction of the gradient-line*.  It's still possible for this to  be
ambiguous as to which corner is referred to (frex, take the above box
and starting-point with an angle of 0deg, so that the NE and SE corner
are equally far), but in these cases the ending-point is the same no
matter which corner you choose.

>> (If there is no such ending point, for example if the starting-point is
>> "-10px -10px" and the angle is "180deg", then the ending-point is identical
>> to the starting-point.)
>
> If you think of the gradient-line as extending on both sides of the starting
> point, then the ending point always exists, the line just automatically
> reverses direction as necessary. This is simpler to implement.

I don't think I'd have a problem with this, but it can possible be a
little confusing as it makes both <angle> and (<angle>+180deg)
equivalent when the starting-point is outside of the box.  These two
angles produce different results when starting-point is inside the
box.  This probably isn't that important, though.

Received on Tuesday, 20 October 2009 04:38:05 UTC