Preventing All Scaling

Hello,

I would like to have full control over what shows up on my screen.  I generate content on the fly, and I want to be able to just get the actual width and height of the screen.  I can’t find an option that allows me to turn scaling off competently.  Is this possible?

You used to be able to set scale = “none” in config.lua but that doesn’t seem to work any longer.  (Correct me if I’m wrong folks.)

However, can you explain your motivation for wanting to abandon scaling?  It is quite useful and if you’re merely having troubles with some side-effects we might be able to help you get around them.

Cheers,

Ed

PS - You can get the actual width and height with display.pixelWidth and display.pixelHeight.

See all the display.* parameters here: http://docs.coronalabs.com/daily/api/library/display/index.html

roaminggamer, thanks for the reply.

I’m a little frustrated with the letterboxing.  I know that you can put another background image to cover the black areas on the side, but it’s not ideal.  I have a landscape app that can programatically adjust to the width.  

here’s what would be ideal: If i could get the relative width of the black bars on the side of the app, I could programatically fill stuff in.  As it stands I have no way of knowing how big they are so it makes it harder to calculate what to put in there.  Is there a function that tells me how much space is on the side using the same virtual pixel units as I use in the app?  In other words, I want to know if the screen stops at -10px or -15px in the x direction so that I can display a sprite there.

Thanks!

Found the answer!

display.screenOriginX - from corona docs “Returns the  x  distance from the left side of the actual screen to the left side of the content area, in reference screen units”

and in detail

http://docs.coronalabs.com/api/library/display/screenOriginX.html

My SSK lib also supplies info on unused width and height for the current display:

https://github.com/roaminggamer/RG_FreeStuff/tree/master/SSK/RGGlobals

See: unusedWidth and unusedHeight.

You used to be able to set scale = “none” in config.lua but that doesn’t seem to work any longer.  (Correct me if I’m wrong folks.)

However, can you explain your motivation for wanting to abandon scaling?  It is quite useful and if you’re merely having troubles with some side-effects we might be able to help you get around them.

Cheers,

Ed

PS - You can get the actual width and height with display.pixelWidth and display.pixelHeight.

See all the display.* parameters here: http://docs.coronalabs.com/daily/api/library/display/index.html

roaminggamer, thanks for the reply.

I’m a little frustrated with the letterboxing.  I know that you can put another background image to cover the black areas on the side, but it’s not ideal.  I have a landscape app that can programatically adjust to the width.  

here’s what would be ideal: If i could get the relative width of the black bars on the side of the app, I could programatically fill stuff in.  As it stands I have no way of knowing how big they are so it makes it harder to calculate what to put in there.  Is there a function that tells me how much space is on the side using the same virtual pixel units as I use in the app?  In other words, I want to know if the screen stops at -10px or -15px in the x direction so that I can display a sprite there.

Thanks!

Found the answer!

display.screenOriginX - from corona docs “Returns the  x  distance from the left side of the actual screen to the left side of the content area, in reference screen units”

and in detail

http://docs.coronalabs.com/api/library/display/screenOriginX.html

My SSK lib also supplies info on unused width and height for the current display:

https://github.com/roaminggamer/RG_FreeStuff/tree/master/SSK/RGGlobals

See: unusedWidth and unusedHeight.