Re: [css3-images] Gradient Magic

> Well, the way I thought of it was to stretch a square to determine the
> length, angle, and placement of the gradient path. But still place the color
> stops along the final path within the final rectangle. What Behnam made me
> think though is that the final angle shouldn't be based on the path of the
> two gradient endpoints (45deg to connect two corners), but rather on a path
> perpendicular to the OTHER two endpoints. Once you resolve what the final
> used angle should be in degrees, you just treat it like those degrees were
> specified by the author.

Brad, that's exactly how I have implemented it, "prependicular to the
other two endpoints", but it worth noting that the result vector would
be mirror of the vector for "normal" mode based on one of y=x or y=-x
lines.

Now that I'm thinking more, a generalization of this would be allowing
basic math operations on the vectors, like "45deg - (bottom right)".

Thanks all for the comments,
-Behnam


-- 
    '     بهنام اسفهبد
    '     Behnam Esfahbod
   '
  *  ..   http://behnam.esfahbod.info
 *  `  *  http://zwnj.org
  * o *   3E7F B4B6 6F4C A8AB 9BB9 7520 5701 CA40 259E 0F8B

Received on Tuesday, 19 July 2011 05:46:41 UTC