We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Gradients (Read 496 times)
Gradients
Aug 23rd, 2006, 5:48am
 
Gradients would be an extremely useful feature in processing.
Re: Gradients
Reply #1 - Aug 23rd, 2006, 10:56am
 
what you can do with the P3D and the OPENGL renderer, is this:

Code:
void setup() {
 size(320, 240, P3D);
 noStroke();
}

void draw() {
 background(255);
 beginShape(QUADS);
 fill(255, 0, 0);
 vertex(10, 10);
 vertex(310, 10);
 fill(255, 255, 0);
 vertex(310, 230);
 vertex(10, 230);
 endShape();
}


this is not truely a gradient feature, as you can't use it directly as a 'fill' on primitve shapes like 'ellipse' or 'rect'.
Page Index Toggle Pages: 1