Page 1 of 1

About love.graphics.newQuad(... sw, sh)

Posted: Mon Aug 11, 2014 8:38 am
by sphyrth
Okay, since I only use Quads for referencing images, I'm not really sure why you need to set 'sw' and 'sh' arguments instead of having the program do it automatically for you.

Are there particular reasons why 'sw' and 'sh' are really needed?

Re: About love.graphics.newQuad(... sw, sh)

Posted: Mon Aug 11, 2014 5:23 pm
by DaedalusYoung
I haven't played with Quads for a while, but as far as I can remember, changing sw and sh basically scales the source image to those values, and then creates the Quad from that. This makes the Quad sizes independent from the source image size.

Re: About love.graphics.newQuad(... sw, sh)

Posted: Wed Aug 13, 2014 12:38 am
by sphyrth
Just checked the wiki again, and you're right. It basically takes into account those who use "scale_factors".

Thanks! :awesome: