Page 1 of 1

Add clipping!

Posted: Wed Nov 12, 2008 12:12 pm
by Borsty
Problem solved :P

Re: Add clipping!

Posted: Wed Nov 12, 2008 12:49 pm
by bartbes
Aren't you looking for setScissor?

Re: Add clipping!

Posted: Wed Nov 12, 2008 1:10 pm
by Borsty
Oh lol, must've slept when I read through the docs :C

Thanks! :P

Re: Add clipping!

Posted: Thu Nov 13, 2008 1:19 am
by mike
Just out of curiosity: What are you using it for?

Re: Add clipping!

Posted: Thu Nov 13, 2008 7:27 am
by Borsty
http://love2d.org/forum/viewtopic.php?f=5&t=257

For some of the controls, ie the edit control.

Re: Add clipping!

Posted: Thu Nov 13, 2008 5:26 pm
by Dr. Magnusson
It'd be nice to several scissors, if possible.

Like, if I had a button with text on it, it'd be nice if I could scissor both the button and the window the button is in.

Re: Add clipping!

Posted: Thu Nov 13, 2008 7:16 pm
by rude
That can be done like this:

Code: Select all

window:draw()
love.graphics.setScissor(window:getBox())
window.button:draw()
love.graphics.setScissor(window.button:getBox())
window.button.label:draw()
love.graphics.setScissor() -- Disables scissor.