电晕:如何在电晕中捕获屏幕? [英] Corona: how to capture a screen in corona?

查看:72
本文介绍了电晕:如何在电晕中捕获屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以建议如何在电晕中捕获整个屏幕以及屏幕的特定部分吗?

Can anyone suggest how to capture a screen in corona both full screen and particular portion of it?

推荐答案

尝试一下.它将起作用:

Try this. It will work :

    local function captureDeviceScreen()
       local captured_image = display.captureScreen( true )
       captured_image:scale(.5,.5)
       local alert = native.showAlert( "Success", "Captured Image is Saved to Library", { "OK" } )
    end
    Runtime:addEventListener("tap",captureDeviceScreen)

这篇关于电晕:如何在电晕中捕获屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆