I tried many ways to capture the screen with corona sdk, I read http://docs.coronalabs.com/api/library/display/captureScreen.html
Corona: how to capture the screen in the crown?
However, when I run the program, Corona sdk hangs and they have to close it. I use the Corona SDK for Windows, and sometimes I get the "Runtime R6025 PURE virtual function call", I tried many code examples that worked with others, here is my code
_W = display.viewableContentWidth
_H = display.viewableContentHeight
local background = display.newRect(0, 0, 320, 480);
background:setFillColor(255,255,255);
local foo = display.newImageRect("images/foo.png",100,100);
foo.anchorX=0.5
foo.anchorY=0.5
foo.x = _W * 0.5;
foo.y = _H * 0.5;
local screenShot = display.captureScreen(true);
foo:removeSelf();
background:removeSelf();
screenShot.xScale = 0.5;
screenShot.yScale = 0.5;
screenShot.rotation = 45;
this is my build.settings file
androidPermissions =
{
"android.permission.VIBRATE",
"android.permission.WRITE_EXTERNAL_STORAGE"
},
source
share