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

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
sphyrth
Party member
Posts: 260
Joined: Mon Jul 07, 2014 11:04 am
Contact:

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

Post 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?
User avatar
DaedalusYoung
Party member
Posts: 413
Joined: Sun Jul 14, 2013 8:04 pm

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

Post 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.
sphyrth
Party member
Posts: 260
Joined: Mon Jul 07, 2014 11:04 am
Contact:

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

Post by sphyrth »

Just checked the wiki again, and you're right. It basically takes into account those who use "scale_factors".

Thanks! :awesome:
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests