====== About the script ====== * Purpose : The script creates a 'screenshot' of a container, but the size of the image is as big as the container and all the items are shown, even the ones out of view. * Author : [[https://plus.google.com/u/1/105066926163073195690|TrianguloY]] * Link: https://plus.google.com/u/1/105066926163073195690/posts/hb2METpC5D7 (with video) ====== How to use the script ====== This script is a tool specially designed for template/screens makers. The image is saved in png. Both the system wallpaper and the desktop wallpaper are not drawn. You can specify also to show disabled items and/or stop points. To make a screenshot just go to the container, scroll it where you want it to be, and run the script from it. The image is saved in a custom configurable path. ====== Script code ====== var path="/storage/emulated/0/LightningLauncher/Images/" var showStopPoints=false; var showInvisible=false; LL.bindClass("android.graphics.Bitmap"); LL.bindClass("java.io.FileOutputStream"); LL.bindClass("java.io.File"); //vars var c=LL.getEvent().getContainer(); var cwidth=c.getWidth(); var cheight=c.getHeight(); var box=c.getBoundingBox(); var boxleft=box.getLeft(); var boxtop=box.getTop(); var boxwidth=box.getRight()-boxleft; var boxheight=box.getBottom()-boxtop; var image=LL.createImage(boxwidth,boxheight); var canvas=image.draw(); //current position var pos=[c.getPositionX(),c.getPositionY(),c.getPositionScale()]; var name=prompt("This will create a screenshot of this container. Please wait until 'Done' shows. \n\n Which name do you want the picture to have?","container"+c.getId()); if(name==null)return; //draw the container background if any var background=c.getView().getBackground(); if(background!=null)canvas.draw(background,pos[0],pos[1],null); //draw each item var items=c.getItems(); for(var t=0;t