how can I access coordinates from a display.newLine?

I need to access the coordinates from a display.newLine - how can I access these?   

For example, from: 

local star = display.newLine( 0,-110, 27,-35 ) star:append( 105,-35, 43,16, 65,90, 0,45, -65,90, -43,15, -105,-35, -27,-35, 0,-110 )  

I want to be able to get these values back again out of star?  (were populated from a 3rd party library so I don’t have access to them in my code so to speak)

cant

doh - I was afraid of that :frowning:   

Hi Greg,

If you’re getting these values (from wherever) to create the newLine, can you just attach them as a property to the object? It would involve storing them in table form (if you can from the 3rd-party software) and then unpacking them into the Corona APIs… but it should work.

[lua]

local initialLine = { 0,110, 27,-35 }

local appendLines = { 105,-35, 43,16, 65,90, 0,45, -65,90, -43,15, -105,-35, -27,-35, 0,-110 }

local star = display.newLine( unpack(initialLine) )

star:append( unpack(appendLines) )

–store the information as properties of the object

star.initialLine = initialLine

star.appendLines = appendLines

[/lua]

thanks Brent - this is what I’d done in fact, however I had to reach into the 3rd party library and make the change, so was just seeking a way not to have to do this (i.e. will have to remember to change each time library changes)

cant

doh - I was afraid of that :frowning:   

Hi Greg,

If you’re getting these values (from wherever) to create the newLine, can you just attach them as a property to the object? It would involve storing them in table form (if you can from the 3rd-party software) and then unpacking them into the Corona APIs… but it should work.

[lua]

local initialLine = { 0,110, 27,-35 }

local appendLines = { 105,-35, 43,16, 65,90, 0,45, -65,90, -43,15, -105,-35, -27,-35, 0,-110 }

local star = display.newLine( unpack(initialLine) )

star:append( unpack(appendLines) )

–store the information as properties of the object

star.initialLine = initialLine

star.appendLines = appendLines

[/lua]

thanks Brent - this is what I’d done in fact, however I had to reach into the 3rd party library and make the change, so was just seeking a way not to have to do this (i.e. will have to remember to change each time library changes)