display.NewLine Does Not Join Properly

Hi,

I am using display.newline with the ‘append’ feature. When the lines join at the end, it isn’t smooth (see screenshot).

Any ideas on how to solve this ?

Hi @yosu,

This is just how the newLine() drawing works. One alternative which would work based on your screenshot is to use a polygon with a transparent fill, and then fill the stroke aspect of that object. The points will come together sharply for this. See the “Polylines” example for an example:

https://github.com/coronalabs/samples-coronasdk/tree/master/Graphics/PolyLines

Take care,

Brent

This was actually an issue in that example that was fixed here. The key to the fix is to have the start and end point meet at opposite angles.  So our star lines in that example meet on a flat edge of the star, rather than at the point.

Hi @yosu,

This is just how the newLine() drawing works. One alternative which would work based on your screenshot is to use a polygon with a transparent fill, and then fill the stroke aspect of that object. The points will come together sharply for this. See the “Polylines” example for an example:

https://github.com/coronalabs/samples-coronasdk/tree/master/Graphics/PolyLines

Take care,

Brent

This was actually an issue in that example that was fixed here. The key to the fix is to have the start and end point meet at opposite angles.  So our star lines in that example meet on a flat edge of the star, rather than at the point.