need some help

i’m trying to make an drawing application. and i use code from sample code “multi punk” which i changed a bit :

 randImage = diskGfx[math.random( 1, 3 )]  
 allDisks[#allDisks + 1] = display.newImage( randImage )  
 local disk = allDisks[#allDisks]  
 disk.x = event.x; disk.y = event.y  
 disk.rotation = math.random( 1, 260 )  
 disk.xScale = 0.8; disk.yScale = 0.8  
  

but the problem:
if i move my finger slowly, i can make a perfect line…but if i move my finger really fast, i will left space between circle…

do you all mind to help me a bit? [import]uid: 33180 topic_id: 9530 reply_id: 309530[/import]

try this … this is better. this should get you started.

[code]
local linePoints = {};
local gRC; – = display.newGroup();

local FALSE = 0
local TRUE = 1
local moved = FALSE;

local bbg = display.newRect(0,0,display.contentWidth,display.contentHeight);

bbg:setFillColor(55,55,55)

local draw;



– drawline


local function drawLine()

if ( moved == FALSE ) then return; end

if ( line ) then line:removeSelf() end

if #linePoints > 2 then
line = display.newLine(linePoints[1].x,linePoints[1].y,linePoints[2].x,linePoints[2].y);
for i = 3, #linePoints, 1 do
line:append(linePoints[i].x,linePoints[i].y);
end
line:setColor(255,255,0);
line.width=12
end

end

local function dragHandles(event)

local phase = event.phase
if “began” == phase then
– Make target the top-most object

local pt = {}
pt.x = event.x;
pt.y = event.y;
table.insert(linePoints,pt);
elseif “moved” == phase then
local pt = {}
pt.x = event.x;
pt.y = event.y;
table.insert(linePoints,pt);
moved = TRUE;
elseif “ended” == phase or “cancelled” == phase then
moved = FALSE;
drawLine(linePoints,40);

end

return true

end


local function draw (event )
if ( moved == TRUE ) then
drawLine()
return true;
end
end



local function main()
Runtime:addEventListener(“touch”,dragHandles);
Runtime:addEventListener(“enterFrame”,draw);
end



main();
[/code] [import]uid: 24 topic_id: 9530 reply_id: 34889[/import]

I have figured out what I think is an easy solution to this need. I’ve posted my code in the Code Exchange. Here’s the link: http://developer.anscamobile.com/code/easy-finger-drawing-undo-functionality [import]uid: 27636 topic_id: 9530 reply_id: 83587[/import]

Hi Jason ,

Have you tested this code for any Android device (Samsung or Sony)??? because i used this code for
my games module and i got perfect texture on IOS devices also on iOS and android simulator, but when i install android build on android device i unable to get expected result

Jason and Carlos, Please give me some suggestion on this issue. [import]uid: 84082 topic_id: 9530 reply_id: 114058[/import]