There is no problem, it’s how you wrote it. You created circle 20px wide with center in point (0, 10) so it is top left corner of screen. Maybe you thought (0, 0) is in bottom left corner? If so , let me correct you. On all types of digital screens (phones, computers, tvs) point (0, 0) is always in top left corner. X axis is directed right and Y axis is directed toward the bottom of screen.
Thank you for the information, but I still don’t understand why when the user starts to draw a line, 30 balls appear from the top left. Here is the code:
local lineTable = {}
local lineWidth = 12
local lineColor = {R=math.random90,2550,G=math.random(0,255), B=math.random(0,255)}
local newLine = function(event)
local function drawLine()
local line = display.newLine(linePoints[#linePoints-1].x,linePoints[#linePoints-1].y,linePoints[#linePoints].x,linePoints[#linePoints].y)
There is no problem, it’s how you wrote it. You created circle 20px wide with center in point (0, 10) so it is top left corner of screen. Maybe you thought (0, 0) is in bottom left corner? If so , let me correct you. On all types of digital screens (phones, computers, tvs) point (0, 0) is always in top left corner. X axis is directed right and Y axis is directed toward the bottom of screen.
Thank you for the information, but I still don’t understand why when the user starts to draw a line, 30 balls appear from the top left. Here is the code:
local lineTable = {}
local lineWidth = 12
local lineColor = {R=math.random90,2550,G=math.random(0,255), B=math.random(0,255)}
local newLine = function(event)
local function drawLine()
local line = display.newLine(linePoints[#linePoints-1].x,linePoints[#linePoints-1].y,linePoints[#linePoints].x,linePoints[#linePoints].y)