[Resolved] Bug in display.newLine / line:append ?

Hey guys,

Clearly this is either still an issue or it has crept back in during some recent changes.

Would one of you please file a new bug report listing 777 as the build you are using?

Thank you,
Peach [import]uid: 52491 topic_id: 5132 reply_id: 99176[/import]

So I’m using build 819, and this still seems to be an issue.
Anyone found a good workaround?
This is another demo to show the bug. clicks close to the red dots will make most of the line to disappear and give strange spikes. This gets worse the thicker lines you use.

My thought now is to paint normal lines between the points and a circle at every point to get rid of “ripped” lines at sharp corners.

[lua]local line = display.newLine(600, 400, 50, 500);
line.width = 30

local circle = display.newCircle(598, 398, 8)
circle:setFillColor( 255, 0, 0, 255 )

local circle2 = display.newCircle(424, 432, 8)
circle2:setFillColor( 255, 0, 0, 255 )

local function onTouch(e)

if e.phase == “began” or e.phase == “moved” then
display.remove(line)

line = display.newLine(600, 400, 50, 500);
line:append(e.x, e.y);
line.width = 30

circle:toFront()
circle2:toFront()

print (e.x)
print (e.y)

end
return true
end

Runtime:addEventListener(“touch”, onTouch);[/lua] [import]uid: 140666 topic_id: 5132 reply_id: 114210[/import]

Hi Alexander,

If this issue is present in build 840 or above could you please file a bug report with the sample you present above and post the # here? [import]uid: 52491 topic_id: 5132 reply_id: 114266[/import]

Just tried it on 2012.845, and it seems to be working fine now! No spikes anymore.
Thanks a lot! [import]uid: 140666 topic_id: 5132 reply_id: 114270[/import]

Happy to hear that :slight_smile:

Peach [import]uid: 52491 topic_id: 5132 reply_id: 114431[/import]