Hello,
I tried to use make of snapshot to double group.
but,it is cut off by the strange.
Please peruse my code…
left part, upper part is disappeared.
Why does it bring this result?
-i want to insert objects to more overlapped groups-
local group1 = display.newGroup();
local _imgs = {};
local _num = 1;
local _start_x = -200;
local _start_y = -200;
for i=1 , 9 do
for j=1 , 9 do
table.insert( _imgs , display.newRect( 0,0,48,48 )); --display.newImage or text too
_imgs[#_imgs].x = _start_x + (i-1)*50;
_imgs[#_imgs].y = _start_y + (j-1)*50;
group1:insert( _imgs[#_imgs] );
end;
end;
------------OK CODE--------
–[[
local snap = display.newSnapshot( 400 , 400 );
snap.group:insert( group1 );
snap.x , snap.y = display.contentWidth/2 , display.contentHeight/2
]]–
------------NG CODE--------
local group2 = display.newGroup();
group2:insert( group1 );
local snap = display.newSnapshot( 400 , 400 );
snap.group:insert( group2 );
snap.x , snap.y = display.contentWidth/2 , display.contentHeight/2;