FROM : R. Scott Thompson
DATE : Wed Oct 13 03:41:39 2004
On Oct 12, 2004, at 6:38 PM, John C. Randolph wrote:
> I'm pretty sure I can reproduce the effect with three axial shadings,
> since each RGB component's value in my original code is a simple
> linear function of the pixel's distance from the origin.
My mistake, you're absolutely right. I saw the different colors at
the four corners and thought the code was blending all four smoothly
together. Looking at the code more closely, I see that you are just
using 3 linear gradients meshed together.
If you wanted to have a rectangle with one corner red, one corner blue,
one corner green and one corner black, then blend them all together in
a nice smooth gradient... you can't do that with CGShading yet :-)
(you can do it in PDF using a Coons Patch shading with straight sides).
Scott
--
Macintosh Software Engineering Consulting Services
Visit my resume at <http://homepage.mac.com/easco/RSTResume.html>
DATE : Wed Oct 13 03:41:39 2004
On Oct 12, 2004, at 6:38 PM, John C. Randolph wrote:
> I'm pretty sure I can reproduce the effect with three axial shadings,
> since each RGB component's value in my original code is a simple
> linear function of the pixel's distance from the origin.
My mistake, you're absolutely right. I saw the different colors at
the four corners and thought the code was blending all four smoothly
together. Looking at the code more closely, I see that you are just
using 3 linear gradients meshed together.
If you wanted to have a rectangle with one corner red, one corner blue,
one corner green and one corner black, then blend them all together in
a nice smooth gradient... you can't do that with CGShading yet :-)
(you can do it in PDF using a Coons Patch shading with straight sides).
Scott
--
Macintosh Software Engineering Consulting Services
Visit my resume at <http://homepage.mac.com/easco/RSTResume.html>
| Related mails | Author | Date |
|---|---|---|
| Peter Laurens | Aug 1, 00:40 | |
| Shawn Erickson | Aug 1, 00:53 | |
| Shawn Erickson | Aug 1, 00:59 | |
| Shawn Erickson | Aug 1, 01:09 | |
| Scott Thompson | Aug 1, 03:35 | |
| Perry Clarke | Aug 1, 05:16 | |
| Ricky Sharp | Aug 1, 16:13 | |
| Ricky Sharp | Aug 1, 18:27 | |
| John C. Randolph | Oct 12, 20:38 | |
| John C. Randolph | Oct 12, 20:48 | |
| R. Scott Thompson | Oct 12, 21:30 | |
| John C. Randolph | Oct 12, 22:29 | |
| R. Scott Thompson | Oct 12, 22:41 | |
| John C. Randolph | Oct 12, 23:07 | |
| R. Scott Thompson | Oct 12, 23:31 | |
| John C. Randolph | Oct 13, 01:38 | |
| R. Scott Thompson | Oct 13, 03:41 | |
| John C. Randolph | Oct 14, 00:26 |






Cocoa mail archive

