Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Snapshot Clipped Strange shape on double group.
Started by salvo Jan 21 2014 07:07 AM

No replies to this topic
snapshot group bug
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

salvo

[GLOBAL: userInfoPane.html]
salvo
  • Observer

  • 7 posts
  • Enterprise

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;

 




[topic_controls]
[/topic_controls]