object:append()

Type Function
Object LineObject
Library display.*
Return value none
Revision Current Public Release (2017.3135)
Keywords append, line append, add line
See also display.newLine()

Overview

Append one or more segments to an existing object created using display.newLine().

Syntax

LineObject:append( x, y [, ... ] )
x, y, ... (required)

Numbers. One or more [x,y] pairs specifying a new point to extent the existing line.

Example

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 )
star:setStrokeColor( 0, 0, 1 )
star.strokeWidth = 5