snapshots not working properly in containers.

Find here a small sample to show the problem.

If you run it, only the first and last examples (using group or container) show anything, the snapshot within the container fails to show anything (note the rect is *massive* so it should display even if off-center).

[lua]-- Function to create the samples

local function newView( x,  y, groupType )

    local container          = display.newContainer( 200, 200 )

    container.x, container.y = x, y

    

    – Create next bit using a snapshot or a group?

    local group

    if groupType == “snapshot” then      group = display.newSnapshot( 200, 200 )

    elseif groupType == “container” then group = display.newContainer( 200, 200 )

    else                                 group = display.newGroup() ; end

    container:insert( group )

    – Add something in

    local rect = display.newRect( 0, 0, 30000, 30000 )

    group:insert( rect )

    

    if groupType == “snapshot” then group:invalidate() ; end – Just in case, eh?

    

end

– Fill BG with another colour

local rect = display.newRect( 0, 0, 10000, 10000 )

rect:setFillColor( 0.2 )

– Create 3 containers, first with a group inside, second with a snapshot inside, third with another container inside

newView( 110, 110 )

newView( 330, 110, “snapshot” )

newView( 550, 110, “container” )[/lua]

Good catch! This is a bug (subtle interplay between containers and snapshots in the renderer). We’ve found the culprit and are working on a fix.

Good catch! This is a bug (subtle interplay between containers and snapshots in the renderer). We’ve found the culprit and are working on a fix.