How do you extract the x1, y1, x2, and y2 coordinates from a line display object?

I used this command to create a line:

local myLine = display.newLine( 0,-110, 27,-35 )

How can I get the coordinates from myLine? I looked at the following links

http://developer.anscamobile.com/content/common-methods
http://developer.anscamobile.com/reference/index/common-properties

but the closest thing I could find is myLine.x and myLine.y, which appear to be x1 and y1 (not sure), but I can’t figure out how to get x2 and y2.

I want this information in order to detect if two lines intersect on the screen.

Thanks in advance! [import]uid: 109574 topic_id: 20608 reply_id: 320608[/import]

The really funky thing about Lua is that if there isn’t a property , you can just add one!

try this:

[code]
local function addLine(x1,y1,x2,y2)
local theLine = display.newLine( x1,y1, x2,y2 )
theLine.x1 =x1
theLine.y1 = y1
theLine.x2 = x2
theLine.y2 = y2
return theLine
end
local myLine = addLine( 0,-110, 27,-35 )

print (myLine.x1,myLine.x2)
[/code] [import]uid: 108660 topic_id: 20608 reply_id: 80898[/import]

Cool, thank you! [import]uid: 109574 topic_id: 20608 reply_id: 80929[/import]