Package org.joshy.sketch.actions.io

Examples of org.joshy.sketch.actions.io.SavePNGAction


        //generate PNG
        File png = new File(appdir,"sample.png");
        u.p("exporting to");
        u.p(png.getAbsolutePath());
        SavePNGAction save = new SavePNGAction(null);
        save.includeBackground = true;
        save.includeDocumentBounds = true;
        save.export(png, (SketchDocument) context.getDocument());



        //execute ant script to run on the roku, passing in the IP addr on the commandline
        List<String> args = new ArrayList<String>();
View Full Code Here


                file.deleteOnExit();

                CanvasDocument doc = context.getDocument();
                if(doc instanceof SketchDocument) {
                    SketchDocument sdoc = (SketchDocument) doc;
                    SavePNGAction save = new SavePNGAction(null);
                    VectorDocContext vdc = (VectorDocContext) context;
                    save.includeBackground = true;
                    if(includeStamp.isSelected()) {
                        save.includeStamp = true;
                    }
                    if(tg.getSelectedButton() == page) {
                        save.includeDocumentBounds = true;
                    }
                    if(tg.getSelectedButton() == selected) {
                        SavePNGAction.exportFragment(file, (Iterable<SNode>) vdc.getSelection().items());
                    } else {
                        save.export(file, sdoc);
                    }
                }
                if(doc instanceof PixelDocument) {
                    SavePNGAction save = new SavePNGAction(null);
                    save.exportStatic(file, (PixelDocument) doc);
                }

                requestMessage(file);
            }
        });
View Full Code Here

TOP

Related Classes of org.joshy.sketch.actions.io.SavePNGAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.