Add clipping!
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Add clipping!
Problem solved
Last edited by Borsty on Wed Nov 12, 2008 1:11 pm, edited 1 time in total.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Add clipping!
Aren't you looking for setScissor?
Re: Add clipping!
Oh lol, must've slept when I read through the docs :C
Thanks!
Thanks!
Re: Add clipping!
Just out of curiosity: What are you using it for?
Now posting IN STEREO (where available)
- Dr. Magnusson
- Prole
- Posts: 22
- Joined: Sun Jul 20, 2008 6:10 pm
Re: Add clipping!
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.
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!
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.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot], Semrush [Bot] and 3 guests