Line.append dynamically

I can’t seem to append points to the end of a line dynamically - the added points are invisible until I add a new display object to the scene.

This works to get the result I need:

local function updateLine(self)  
 if(self.circle ~= nil) then self.circle:removeSelf(); end  
 self.circle = display.newCircle(0,0,1);  
 self.circle.isVisible = false;  
 self.group:insert(self.circle);  
end  
  
local function drawLine(self)  
 --.......................................  
 -- Somewhere along the way self.lineTrace was initialized  
 -- ......................................  
 local curPoint = self.vector[curPointNumber];  
 self.lineTrace:append(curPoint[1], curPoint[2]);  
 updateLine(self);   
end  
  
-- Then I call this drawLine method in response to touch events  

But is obviously a lot slower than it needs to be.

Is there any other way I can get around this limitation? [import]uid: 8145 topic_id: 13344 reply_id: 313344[/import]

Came up with this bit:

local function updateLine(self)  
 self.lineTrace.width = (self.lineTraceWidth \* 2 + 1) - self.lineTrace.width;  
end  

and when I init self.lineTrace, I init the width to be self.lineTraceWidth (so it pivots around the actual width I need by 1 pixel :)). This also forces the line to be displayed.

Still not the way I’d prefer it to be, but should be faster (speed is what I’m aiming for atm). [import]uid: 8145 topic_id: 13344 reply_id: 48976[/import]