After searching a bit I can't find a definitive answer for this. I guess it's not possible but maybe I'm missing something?
Is there a way to somehow "mask" areas of the screen so draw operations don't apply to it?
For example I'm using rectfill(10,10,100,100), but I want to use some other operation to make it so that parts of that rect are not actually drawn on-screen.
Any ideas?



You can use clip(x,y,w,h) to set the screen's clipping region before you draw, then reset it when you're done.



MBoffin thanks! That'll let me clip rectangles. I guess I could write some smart wrapper to do more complicated shapes...



I too would be interested in this.
I can think of a couple of ways to do this (e.g. drawing to a back-buffer first), but nothing really simple!
[Please log in to post a comment]