Skip navigation.
 
mlRe: CGShading
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>

Related mailsAuthorDate
mlCGShading Peter Laurens Aug 1, 00:40
mlRe: CGShading Shawn Erickson Aug 1, 00:53
mlRe: CGShading Shawn Erickson Aug 1, 00:59
mlRe: CGShading Shawn Erickson Aug 1, 01:09
mlRe: CGShading Scott Thompson Aug 1, 03:35
mlRe: CGShading Perry Clarke Aug 1, 05:16
mlRe: CGShading Ricky Sharp Aug 1, 16:13
mlRe: CGShading Ricky Sharp Aug 1, 18:27
mlRe: CGShading John C. Randolph Oct 12, 20:38
mlRe: CGShading John C. Randolph Oct 12, 20:48
mlRe: CGShading R. Scott Thompson Oct 12, 21:30
mlRe: CGShading John C. Randolph Oct 12, 22:29
mlRe: CGShading R. Scott Thompson Oct 12, 22:41
mlRe: CGShading John C. Randolph Oct 12, 23:07
mlRe: CGShading R. Scott Thompson Oct 12, 23:31
mlRe: CGShading John C. Randolph Oct 13, 01:38
mlRe: CGShading R. Scott Thompson Oct 13, 03:41
mlRe: CGShading John C. Randolph Oct 14, 00:26