Scaling & positioning lines in relation to each other

How do I scale and position a bunch of lines so that their original relations towards each other remain intact?

Background: I’m using display.newLine to record a user drawing. I want to reassemble this drawing later on at a different position and in different size, so I’m using display.newLine again with the recorded coordinates. However, right now, the individual lines are “disconnected” and don’t properly touch after re-drawing, because their coordinates in relation to each other are wrong now. Do I need a dispay group here, or can I do it differently?

Thanks! [import]uid: 10284 topic_id: 7573 reply_id: 307573[/import]

Well, I sort of have something that looks like it’s working, even though I’m not using display groups at the moment. For reference,

[code]local offsetX = x - (app.canvasRectangle.width / 2) * scale
local offsetY = y - (app.canvasRectangle.height / 2) * scale

lines = appNormalizeDrawingTowardsScale(lines, scale) – multiply points by scale

for i = 1, #lines do
local linePoints = lines[i]
local self = spriteModule.spriteClass(‘line’, ‘lineOfDrawing’, nil, nil, false, linePoints)

self.xOrigin = linePoints[1] + offsetX
self.yOrigin = linePoints[2] + offsetY
self.width = math.floor(app.canvasStrokeWidth * scale)

appAddSprite(self, handle, moduleGroup)
end[/code] [import]uid: 10284 topic_id: 7573 reply_id: 26869[/import]