Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How can I adjust background size so it doesn't stretch?
Started by raguilar Feb 10 2019 12:40 PM

1 reply to this topic
background size specifications image size background size help
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

raguilar

[GLOBAL: userInfoPane.html]
raguilar
  • Observer

  • 1 posts
  • Corona SDK

Here is a screenshot of my code so far and how the image is stretching to accommodate the screen size. How can I make the image look better? I'm EXTREMELY new to Lua and if someone could explain to me in heep a deep hur dur (very simply) I would be so appreciative. Thank you!



[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 730 posts
  • Corona SDK

You may have forgotten to include that screenshot, but that's alright. :D When posting code, please use the code formatting options here on the forum, i.e. the <> button.

Now, without seeing any of your code, I'm guessing that you are using a very small image or you are using display.newImage() instead of display.newImageRect(), the former of which does not automatically scale. Just in case, you might want to read up on:
https://docs.coronalabs.com/guide/basics/configSettings/index.html#dynamic-image-selection

and

https://coronalabs.com/blog/2018/08/08/understanding-content-scaling-in-corona/

 

If my guess didn't answer your question at all, then use the code formatting options and show us some of that code of yours. :P




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: background, size, specifications, image size, background size, help