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)
   BGraphics and alpha(int[] mask)
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: BGraphics and alpha(int[] mask)  (Read 347 times)
sspboyd


BGraphics and alpha(int[] mask)
« on: Dec 12th, 2004, 11:24pm »

Hi,
I have used an int[] as an alpha mask for BImages, but I am having trouble using this method with BGraphics.
 
 
Code:
// this doesn't work for me
BGraphics myG;
myG.alpha(mask);
image(myG,0,0);

 
Is this usage/combination of BGraphics and alpha() supported?  
 
steve
 
 

gmail.com w/ sspboyd username
sspboyd


Re: BGraphics and alpha(int[] mask)
« Reply #1 on: Dec 13th, 2004, 12:03am »

I found my mistake.
 
I was setting the mask array with 1s and 0s instead of recognizing that the range should have been from 0 to 255. As a result the alpha mask was virtually all transparent.
 
steve
 
 

gmail.com w/ sspboyd username
vent

WWW
Re: BGraphics and alpha(int[] mask)
« Reply #2 on: Dec 13th, 2004, 5:04am »

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffff
 

http://www.shapevent.com/
Pages: 1 

« Previous topic | Next topic »