Package org.apache.poi.xslf.model.geom

Examples of org.apache.poi.xslf.model.geom.Context


                    0,
                    w,
                    h
            );

            Context ctx = new Context(geom, pathAnchor, new IAdjustableShape() {

                public Guide getAdjustValue(String name) {
                    CTPresetGeometry2D prst = _shape.getSpPr().getPrstGeom();
                    if (prst.isSetAvLst()) {
                        for (CTGeomGuide g : prst.getAvLst().getGdList()) {
View Full Code Here


                    0,
                    w,
                    h
            );

            Context ctx = new Context(geom, pathAnchor, new IAdjustableShape() {

                public Guide getAdjustValue(String name) {
                    CTPresetGeometry2D prst = _shape.getSpPr().getPrstGeom();
                    if (prst.isSetAvLst()) {
                        for (CTGeomGuide g : prst.getAvLst().getGdList()) {
View Full Code Here

        assertEquals(187, shapes.size());


        for(String name : shapes.keySet()) {
            CustomGeometry geom = shapes.get(name);
            Context ctx = new Context(geom, new Rectangle2D.Double(0, 0, 100, 100), new IAdjustableShape() {
                public Guide getAdjustValue(String name) {
                    return null;
                }
            });
            for(Path p : geom){
View Full Code Here

            new Guide("a4", "?: adj3 adj1 adj2"), // a4 = adj3 > 0 ? adj1 : adj2
            new Guide("a5", "abs -2"),
        };

        CustomGeometry geom = new CustomGeometry(CTCustomGeometry2D.Factory.newInstance());
        Context ctx = new Context(geom, null, null);
        for(Formula fmla : ops) {
            ctx.evaluate(fmla);
        }

        assertEquals(100.0, ctx.getValue("adj1"));
        assertEquals(200.0, ctx.getValue("adj2"));
        assertEquals(1.0, ctx.getValue("a1"));
        assertEquals(101.0, ctx.getValue("a2"));
        assertEquals(1.5, ctx.getValue("a3"));
        assertEquals(200.0, ctx.getValue("a4"));
        assertEquals(2.0, ctx.getValue("a5"));
    }
View Full Code Here

                    0,
                    w,
                    h
            );

            Context ctx = new Context(geom, pathAnchor, new IAdjustableShape() {

                public Guide getAdjustValue(String name) {
                    CTPresetGeometry2D prst = _shape.getSpPr().getPrstGeom();
                    if (prst.isSetAvLst()) {
                        for (CTGeomGuide g : prst.getAvLst().getGdArray()) {
View Full Code Here

TOP

Related Classes of org.apache.poi.xslf.model.geom.Context

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.