Pixels vs density independent units
Posted: Sun Aug 14, 2022 5:25 pm
The wiki states "Most LÖVE functions return values and expect arguments in terms of pixels rather than density-independent units.
The units of love.graphics.getWidth, love.graphics.getHeight, love.mouse.getPosition, mouse events, love.touch.getPosition, and touch events are always in terms of pixels."
So, I'm nervous about the word "most".
Q1. How can I tell which LÖVE functions use pixels, and which use density-independent units?
Q2. Assume I'm making an app that should work on mobiles as well as desktops. Would you recommend I use pixels or density-independent units internally?
https://github.com/oddstream/lsol
The units of love.graphics.getWidth, love.graphics.getHeight, love.mouse.getPosition, mouse events, love.touch.getPosition, and touch events are always in terms of pixels."
So, I'm nervous about the word "most".
Q1. How can I tell which LÖVE functions use pixels, and which use density-independent units?
Q2. Assume I'm making an app that should work on mobiles as well as desktops. Would you recommend I use pixels or density-independent units internally?
https://github.com/oddstream/lsol