get other Coordonate with display.newLine

Hello Corona members,

I am quite new, and I want to add this little code on the begining of the main.lua

When you print line.x or line.y, you got the origin.

Why not to put my code by default inside the corona sdk project to be able to print line.x1 , line.y1, line.x2, line.y2 etc…

local originLine=display.newLine function display.newLine(...) local params=arg local debut=((type(arg[1])=="table") and 4)or 3 //to know if the parent group of line is display.currentStage or an other display Group local line=originLine(unpack(params)) for k=1,(-debut+1+#params)/2 do //I put k-value on xi's and yi's coordonate of line line["x"..tostring(k)]=params[debut+2\*(k-1)] line["y"..tostring(k)]=params[1+debut+2\*(k-1)] end return line end

Thank you.

nobody ?

So you’re asking to have .x1, .y1, .x2, .y2 available as attributes? 

You would  need to create a feature request for that. Most likely we would make a table of vectors available. But to get a feature request started, please visit:

http://feedback.coronalabs.com

And create a new entry and get people to vote it up.

Rob

thanks

nobody ?

So you’re asking to have .x1, .y1, .x2, .y2 available as attributes? 

You would  need to create a feature request for that. Most likely we would make a table of vectors available. But to get a feature request started, please visit:

http://feedback.coronalabs.com

And create a new entry and get people to vote it up.

Rob

thanks