[cairo] Optimize horizontal/vertical gradients
Keith Packard
keithp at keithp.com
Thu Feb 17 05:57:52 PST 2005
Around 23 o'clock on Feb 13, Owen Taylor wrote:
> It's possible that there should
> be some epsilon in the tests, to handle round-off errors in
> 90 degree rotations and the like, maybe something like
>
> fabs (p2.x - p1.x) < EPSILON * fabs (p2.y - p1.y)
That's probably a good idea. I suggest we can find an appropriate EPSILON
by evaluating the extreme values of the two bracketing terms assuming
the user computed them with the standard C library sin/cos functions using
the angles -3.0 * M_PI / 2.0, -M_PI/2.0, M_PI/2.0 and 3.0 * M_PI / 2.0.
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050217/c43c6ef6/attachment.pgp
More information about the cairo
mailing list