Log In  


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?

P#47295 2017-12-11 17:51 ( Edited 2017-12-12 04:38)


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.

P#47296 2017-12-11 17:54


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

P#47299 2017-12-11 19:50


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!

P#47310 2017-12-12 04:38

Log in to post a comment


New User | Account Help
:: New User
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-10-22 22:45 | 0.223s | 1572k | Q:13