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.
IndexProgramming Questions & HelpPrograms › can we use anyshape as mask object
Page Index Toggle Pages: 1
can we use anyshape as mask object? (Read 375 times)
can we use anyshape as mask object?
Dec 28th, 2007, 3:57pm
 
hi! I want to use anyshape(rect,ellipse,line,triangle...) as mask object. when I want to use some image(jpg, gif, png), processing giving me an error that image must be the same with size. so that I just want to rect or ellipse.

if it is possible, could u give me some example plz...?
Re: can we use anyshape as mask object?
Reply #1 - Dec 28th, 2007, 9:38pm
 
The same size means that both images has to have the same width and height. So you have to create an PImage object with the same dimension as the image you want to mask, draw your shapes in that and than use this image as the mask. I've done something like this some years before (http://www.eskimoblood.de/code.php?i=24), but its written in the old alpha processing version.
Re: can we use anyshape as mask object?
Reply #2 - Dec 28th, 2007, 9:47pm
 
thank u andreas
Page Index Toggle Pages: 1