Mask Image

Hi people,

I dont know how to do the next thing, i want to have a picture that is moving in the y axis(from 0) but shouldnt appear in the screen after pass some point, the idea is simulate that the image appear like is been printing not at once, so how this can be implemented, i should use mask or other thing?, thanks in advance.

Hi s3bastian, you could try drawing something on top of the area you don’t want it to appear. So if your background is black, try drawing a black rectangle in the upper half of the screen:

ofRect(0,0,ofGetWidth(), ofGetHeight() / 2);  
ofSetColor(255, 255, 255);  
img.draw(mouseX, mouseY);  

Where img is the image you loaded in earlier (in setup maybe).


Thanks for your answer, but what happen if i have a Image as backgroud, this can be applied.

if I understand it right, maybe you can use grabScreen function (…-grabScreen ) to grab the background no matter what it is and make the rest like kyle said.