Hello guys
I’m having a problem that I do not know how to solve. I need some small rectangles at a distance from each other. Agreements shall be width = 2. The problme (which still have with all widths) and that the appearance is not consistent.
In the picture the green arrows indicate the most large rectangles. Although the code seems correct …
you can help me solve what?
The simple code:
local w = display.contentWidth local h = display.contentHeight local background = display.newRect(0, 0, w, h) background.x = w/2 background.y = h/2 local tab = {} for i = 1, 14 do tab[i] = display.newRect(0, 0, 2, 20) tab[i].x = 20\*i tab[i].y = 50 tab[i]:setFillColor( 1, 0, 0 ) end