Takes a screen shot of your app and saves it to the specified path.
Example - Take Screenshot
function OnStart()
{
lay = app.CreateLayout( "linear" );
img = app.CreateImage( null, 1, 1 );
img.SetPaintColor( "green" );
img.DrawCircle( 0.5, 0.5, 0.3 );
lay.AddChild( img );
app.AddLayout( lay );
app.ScreenShot( "/sdcard/file.jpg" );
img.SetImage( "/sdcard/file.jpg" );
}
from native import app
def OnStart():
lay = app.CreateLayout("linear")
img = app.CreateImage(None, 1, 1)
img.SetPaintColor("green")
img.DrawCircle(0.5, 0.5, 0.3)
lay.AddChild(img)
app.AddLayout(lay)
app.ScreenShot("/sdcard/file.jpg")
img.SetImage("/sdcard/file.jpg")