Package org.joshy.sketch.model

Examples of org.joshy.sketch.model.SImage


        List images = export.getDelayedImages();
        Map<String,BufferedImage> writtenImages = new HashMap<String,BufferedImage>();
        for(Object i : images) {
            if(i instanceof SImage) {
                SImage image = (SImage) i;
                if(!writtenImages.containsKey(image.getRelativeURL())) {
                    ZipEntry ie = new ZipEntry(dir+"/resources/"+image.getRelativeURL());
                    out.putNextEntry(ie);
                    ImageIO.write(image.getBufferedImage(),"png",out);
                    out.flush();
                    out.closeEntry();
                    writtenImages.put(image.getRelativeURL(),image.getBufferedImage());
                }
            }
            if(i instanceof PatternPaint) {
                PatternPaint paint = (PatternPaint) i;
                if(!writtenImages.containsKey(paint.getRelativeURL())) {
View Full Code Here


    protected void mouseReleased(MouseEvent event, Point2D.Double cursor) {
    }

    private void load(File file, Point2D cursor) throws IOException {
        SketchDocument doc = (SketchDocument) context.getDocument();
        SImage image = new SImage(file);
        image.setTranslateX(cursor.getX());
        image.setTranslateY(cursor.getY());
        doc.getCurrentPage().add(image);
        context.redraw();
    }
View Full Code Here

                        Photo photo  = (Photo) photoList.getModel().get(photoList.getSelectedIndex());
                        try {
                            SketchDocument sd = context.getDocument();
                            String file = photo.getFullURL().getFile();
                            file = file.substring(file.lastIndexOf("/")+1);
                            dupe = new SImage(photo.getFullURL().toURI(), file, true, photo.getImage(), context);
                            sd.getCurrentPage().add(dupe);
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                        context.redraw();
View Full Code Here

TOP

Related Classes of org.joshy.sketch.model.SImage

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.