FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   Alpha Syntax
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Alpha Syntax  (Read 506 times)
skloopy

WWW
Alpha Syntax
« on: Mar 14th, 2003, 8:46pm »

Hi, is the syntax for the new alpha transparency the same as in the reference? I tried using color(r, g, b, a); but it didn't work. I tried with floats and with ints.
 
REAS


WWW
Re: Alpha Syntax
« Reply #1 on: Mar 17th, 2003, 10:57am »

hello ryan,
 
alpha hasn't been integrated into the color() function yet. but you can use fill(r, g, b, a) and stroke(r, g, b, a)
 
+ casey
 
Martin

122417302122417302martingomez_listsmg1ph WWW Email
Re: Alpha Syntax
« Reply #2 on: Mar 17th, 2003, 2:15pm »

casey,
 
stroke(r,g,b,a) is erratic..  
 
// this doesn't render what you want it to...
smooth();
noFill();
stroke(0,0,255,20);
line(10,10,90,90);
stroke(0,0,255);
line(20,30,70,80);
stroke(0,0,255,20);
ellipse(50,50,10,10);
 
 
skloopy

WWW
Re: Alpha Syntax
« Reply #3 on: Mar 17th, 2003, 11:12pm »

Shoot. I'm guessing that means no Bimage transparency either.. I mean local transparency, not the whole image..
 
fry


WWW
Re: Alpha Syntax
« Reply #4 on: Mar 17th, 2003, 11:46pm »

on Mar 17th, 2003, 2:15pm, Martin wrote:
// this doesn't render what you want it to...
smooth();
noFill();
stroke(0,0,255,20);
line(10,10,90,90);
stroke(0,0,255);
line(20,30,70,80);
stroke(0,0,255,20);
ellipse(50,50,10,10);
 

yup, that's the line() bug mentioned under 'known bugs' in the revisions.txt. i hope to have that ironed out for 53.
 
fry


WWW
Re: Alpha Syntax
« Reply #5 on: Mar 17th, 2003, 11:49pm »

on Mar 17th, 2003, 11:12pm, Ryan wrote:
Shoot. I'm guessing that means no Bimage transparency either.. I mean local transparency, not the whole image..

i haven't tested local transparency much in images, but it may work (the code is in there for rendering, at least). it's possible though that a .gif that has alpha set may not respect the alpha, though you could mess with an image's pixel values to get alpha to work. if it's not behaving, post us a bug report in the bugs section.  
 
whole-image transparency should work, by setting the alpha on the fill().
 
Pages: 1 

« Previous topic | Next topic »