Ok. Lets put aside text for a second. I tried the following which if you read the code is expected to give me the same rectangle and draw a simple line right in the middle of it. The line is also drawn off-center as my text was earlier on. Am I making a mistake in my code? I don’t think so but just in case I’m missing something here… See attached image for result of the code.
local widget = require( "widget" ) local titleBarHeight = 100 local splitLeftWidth = 400 local titleBarStrokeWidth = 2 local titleBarFillColor = {247/255, 247/255, 247/255} local titleBarStrokeColor = {192/255, 192/255, 196/255} local titleBarLeftLabel = "Settings" local titleBarLeft = display.newRect(0, 0, splitLeftWidth, titleBarHeight) titleBarLeft.anchorX, titleBarLeft.anchorY = 0, 0 titleBarLeft.strokeWidth = titleBarStrokeWidth titleBarLeft:setFillColor(unpack(titleBarFillColor)) titleBarLeft:setStrokeColor(unpack(titleBarStrokeColor)) local myLine = display.newLine(0, titleBarHeight / 2, splitLeftWidth, titleBarHeight / 2) myLine.anchorX, myLine.anchorY = 0.5, 0.5 myLine:setStrokeColor(0,0,0)