Package com.joshondesign.xml

Examples of com.joshondesign.xml.Doc.xpathString()


        rect2.setFillPaint(FlatColor.GREEN);
        page.add(rect2);
       
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(50.0,50.0)".equals(xdoc.xpathString("/svg/g/@transform")));
        assertTrue("10.0".equals(xdoc.xpathString("/svg/g/rect/@width")));
        assertTrue("1.0".equals(xdoc.xpathString("/svg/g/ellipse/@stroke-width")));
        assertTrue("150.0".equals(xdoc.xpathString("/svg/rect/@width")));
    }

View Full Code Here


        page.add(rect2);
       
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(50.0,50.0)".equals(xdoc.xpathString("/svg/g/@transform")));
        assertTrue("10.0".equals(xdoc.xpathString("/svg/g/rect/@width")));
        assertTrue("1.0".equals(xdoc.xpathString("/svg/g/ellipse/@stroke-width")));
        assertTrue("150.0".equals(xdoc.xpathString("/svg/rect/@width")));
    }


    @Test public void testArea() throws Exception {
View Full Code Here

       
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(50.0,50.0)".equals(xdoc.xpathString("/svg/g/@transform")));
        assertTrue("10.0".equals(xdoc.xpathString("/svg/g/rect/@width")));
        assertTrue("1.0".equals(xdoc.xpathString("/svg/g/ellipse/@stroke-width")));
        assertTrue("150.0".equals(xdoc.xpathString("/svg/rect/@width")));
    }


    @Test public void testArea() throws Exception {
        SRect rect = new SRect(0,0,10,10);
View Full Code Here

        sarea.setTranslateY(10);
        sarea.setFillPaint(FlatColor.GREEN);
        page.clear();
        page.add(sarea);
        Doc xdoc = saveAndReadback(doc);
        assertTrue("translate(10.0,10.0)".equals(xdoc.xpathString("/svg/path/@transform")));
    }

    @Test public void testArrow() {

    }
View Full Code Here

        if(file != null) {
            doc.setBaseURI(file.toURI());
        }
        SketchDocument sdoc = new SketchDocument();
        sdoc.removePage(sdoc.getCurrentPage());
        int version = Integer.parseInt(doc.xpathString("/sketchy/@version"));

        Log.info("version = ",version);
        if(version < NativeExport.CURRENT_VERSION) {
            doc = upgradeDocument(doc);
        }
View Full Code Here

        loadNumberAttribute(doc.xpathElement("/sketchy/info"),sdoc,"width");
        loadNumberAttribute(doc.xpathElement("/sketchy/info"),sdoc,"height");
        for(Elem e : doc.xpath("/sketchy/page")) {
            loadPage(sdoc,e,zipFile);
        }
        String type = doc.xpathString("/sketchy/info/@type");
        if("presentation".equals(type)) {
            sdoc.setPresentation(true);
        }

        Elem info = doc.xpathElement("/sketchy/info");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.