Package org.joshy.sketch.model

Examples of org.joshy.sketch.model.SketchDocument$Guideline


        return new NewPresentationDocAction(main);
    }

    @Override
    public CanvasDocument createNewDoc() {
        SketchDocument doc = new SketchDocument();
        doc.setPagesVisible(true);
        SketchDocument.SketchPage page = doc.getCurrentPage();
        new PresoModeHelper.AddTitlePage(null).insertContents(page);
        return doc;
    }
View Full Code Here



    @Test
    public void importSVG() throws Exception {
        URL url = ImportTests.class.getResource("test1.svg");
        SketchDocument doc = ImportAction.importSVG(url);
        //check that the first node is a group
        assertTrue(doc.getPages().get(0).getModel().get(0) instanceof SGroup);
        //go down the tree to the polygon
        SGroup g1 = (SGroup) doc.getPages().get(0).getModel().get(0);
        SGroup g2 = (SGroup) g1.getNodes().get(1);
        SPoly p1 = (SPoly) g2.getNodes().get(0);
        //test the color of the polygon
        assertTrue(p1.getFillPaint() instanceof FlatColor);
        FlatColor c1 = (FlatColor) p1.getFillPaint();
View Full Code Here

        VectorDocContext context = helper.createDocContext(null);
        SketchCanvas canvas = new SketchCanvas(context);
        OpenAction action = new OpenAction(null);
        u.p("Url = " + this.getClass().getResource("oldVersion_-1.xml"));
        action.load(this.getClass().getResourceAsStream("oldVersion_-1.xml"),null,"oldVersion_-1.xml",null);
        SketchDocument doc = canvas.getDocument();
        u.p("canvas doc = " + doc);
        for(SNode shape : doc.getCurrentPage().getNodes()) {
            u.p("shape = " + shape);
        }
    }
View Full Code Here

TOP

Related Classes of org.joshy.sketch.model.SketchDocument$Guideline

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.