Hi,
In my project, I create several circles and draw lines between them (with display.newLine), but when I simulates the project in Corona Simulator, the lines are not visible in some devices, Can anyone please help?
The minimum code to reproduce the problem is like:
local radius = 20 local circles = {} for i = 1, 5 do circles[i] = {} for j = 1, 8 do circles[i][j] = display.newCircle(100 \* j + (j - 0.5) \* 2 \* radius, 100 \* i + (i - 0.5) \* 2 \* radius, radius) end end for i = 1, 5 do for j = 1, 7 do display.newLine(circles[i][j].x, circles[i][j].y, circles[i][j + 1].x, circles[i][j + 1].y) end end
That has to do with Corona’s dynamic scaling most likely.
In your config.lua, what width and height have you defined? Most likely what is happening is that you’ve defined a larger content area, which then leads to downscaling the content for smaller devices. Since you have not given the lines a width, i.e. it defaults to 1px, then downscaling from 1px to less than 0.5px probably results in the lines not showing at all.
i.e. give your lines a larger width and/or look at your content area settings.