display.captureScreen and display.save adds bounding box to objects

Hi!

I am playing around with letting the user draw some lines and then saving them to the album. The code I use for drawing is a modified version of some example code Carlos posted here on the forum, so you know it’s good stuff :slight_smile:

Anyway - whenever I try to save the contents of the screen, it seems like corona adds white bounding boxes around all the objects!?

Here is a screenshot of what it should look like and what it looks like:
http://i.imgur.com/QfsFc.jpg

The two dots are circle display objects used as buttons for testing, and even they get a weird white background around them.

At first, I tried using display.save - and thought this was related to weird groupings or something, and that display.captureScreen would sort it out. But the effect still persists.

I am using the simulator for an iPad in horizontal mode - I saw that there were some errors relating to screencapture in this format, but I could not find more info.

For the record, I am using the director class and I have the drawing objects in a separate group. I tried to put them all in the same group but the app still produced this weird effect.

Does anybody have a solution for this? Have any of you experienced the same problem?

Thanks [import]uid: 13935 topic_id: 9847 reply_id: 309847[/import]

hi i had just chked that and found no problem here is my code

[lua] local bg = display.newRect(0,0,display.contentWidth,display.contentHeight)
bg:setFillColor(0)
local function touchF(e)
if “began” == e.phase then
x0 = e.x
y0 = e.y
elseif “moved” == e.phase then
print(“asd”)
local line = display.newLine(x0,y0,e.x,e.y)
line.width = 5
line:setColor(255)
x0 = e.x
y0 = e.y
elseif “ended” == e.phase or “cancelled” == e.phase then

end
end
bg:addEventListener(“touch”,touchF)

local function callMe()
local screenCap = display.captureScreen( true )
screenCap:scale(0.5,0.5)
end
timer.performWithDelay(5000,callMe)[/lua]

but i have met with other issue if i set width = 320 and height = 480 got full image

and if i set width = 768 and height = 1024 got only half image seems like it is taking image only from 0 to 320 (width) or 480 (height) [import]uid: 12482 topic_id: 9847 reply_id: 35881[/import]

I’m guessing you’re seeing what I believe is OpenGL quads on which Corona is drawing each display object. Did you try on a device? [import]uid: 51516 topic_id: 9847 reply_id: 35883[/import]

Hi

I realized I never followed this up and I apologize for bumping - but I though I’d answer here for the record, so if anyone experiences the same thing and searches for it gets an answer:

Basically - it works on an actual device. The white squares only showed up on my computer for testing. In other words - don’t worry about it :slight_smile: [import]uid: 13935 topic_id: 9847 reply_id: 41956[/import]