Examples of CTPositiveSize2D


Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

    private CTTransform2D t2d;

    public XSSFChildAnchor(int x, int y, int cx, int cy) {
        t2d = CTTransform2D.Factory.newInstance();
        CTPoint2D off = t2d.addNewOff();
        CTPositiveSize2D ext = t2d.addNewExt();

        off.setX(x);
        off.setY(y);
        ext.setCx(Math.abs(cx - x));
        ext.setCy(Math.abs(cy - y));
        if(x > cxt2d.setFlipH(true);
        if(y > cyt2d.setFlipV(true);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

    private CTTransform2D t2d;

    public XSSFChildAnchor(int x, int y, int cx, int cy) {
        t2d = CTTransform2D.Factory.newInstance();
        CTPoint2D off = t2d.addNewOff();
        CTPositiveSize2D ext = t2d.addNewExt();

        off.setX(x);
        off.setY(y);
        ext.setCx(Math.abs(cx - x));
        ext.setCy(Math.abs(cy - y));
        if(x > cxt2d.setFlipH(true);
        if(y > cyt2d.setFlipV(true);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

            docPr.setId(id);
            /* This name is not visible in Word 2010 anywhere. */
            docPr.setName("Drawing " + id);
            docPr.setDescr(filename);

            CTPositiveSize2D extent = inline.addNewExtent();
            extent.setCx(width);
            extent.setCy(height);

            // Grab the picture object
            CTGraphicalObject graphic = inline.getGraphic();
            CTGraphicalObjectData graphicData = graphic.getGraphicData();
            CTPicture pic = getCTPictures(graphicData).get(0);

            // Set it up
            CTPictureNonVisual nvPicPr = pic.addNewNvPicPr();

            CTNonVisualDrawingProps cNvPr = nvPicPr.addNewCNvPr();
            /* use "0" for the id. See ECM-576, 20.2.2.3 */
            cNvPr.setId(0L);
            /* This name is not visible in Word 2010 anywhere */
            cNvPr.setName("Picture " + id);
            cNvPr.setDescr(filename);

            CTNonVisualPictureProperties cNvPicPr = nvPicPr.addNewCNvPicPr();
            cNvPicPr.addNewPicLocks().setNoChangeAspect(true);

            CTBlipFillProperties blipFill = pic.addNewBlipFill();
            CTBlip blip = blipFill.addNewBlip();
            blip.setEmbed( picData.getPackageRelationship().getId() );
            blipFill.addNewStretch().addNewFillRect();

            CTShapeProperties spPr = pic.addNewSpPr();
            CTTransform2D xfrm = spPr.addNewXfrm();

            CTPoint2D off = xfrm.addNewOff();
            off.setX(0);
            off.setY(0);

            CTPositiveSize2D ext = xfrm.addNewExt();
            ext.setCx(width);
            ext.setCy(height);

            CTPresetGeometry2D prstGeom = spPr.addNewPrstGeom();
            prstGeom.setPrst(STShapeType.RECT);
            prstGeom.addNewAvLst();

View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

            blip.addNewBlip().setEmbed("");
            blip.addNewStretch().addNewFillRect();

            CTShapeProperties sppr = pic.addNewSpPr();
            CTTransform2D t2d = sppr.addNewXfrm();
            CTPositiveSize2D ext = t2d.addNewExt();
            //should be original picture width and height expressed in EMUs
            ext.setCx(0);
            ext.setCy(0);

            CTPoint2D off = t2d.addNewOff();
            off.setX(0);
            off.setY(0);
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

            dy2 = (int)(EMU_PER_PIXEL*(ch-delta));
        }
        anchor.setRow2(row2);
        anchor.setDy2(dy2);

        CTPositiveSize2D size2d =  ctPicture.getSpPr().getXfrm().getExt();
        size2d.setCx((long)(scaledWidth*EMU_PER_PIXEL));
        size2d.setCy((long)(scaledHeight*EMU_PER_PIXEL));

        return anchor;
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

            nvpr.setId(0);
            nvpr.setName("Group 0");
            nv.addNewCNvGrpSpPr();
            CTGroupShapeProperties sp = shape.addNewGrpSpPr();
            CTGroupTransform2D t2d = sp.addNewXfrm();
            CTPositiveSize2D p1 = t2d.addNewExt();
            p1.setCx(0);
            p1.setCy(0);
            CTPoint2D p2 = t2d.addNewOff();
            p2.setX(0);
            p2.setY(0);
            CTPositiveSize2D p3 = t2d.addNewChExt();
            p3.setCx(0);
            p3.setCy(0);
            CTPoint2D p4 = t2d.addNewChOff();
            p4.setX(0);
            p4.setY(0);

            prototype = shape;
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

    public void setCoordinates(int x1, int y1, int x2, int y2) {
        CTGroupTransform2D t2d = ctGroup.getGrpSpPr().getXfrm();
        CTPoint2D off = t2d.getOff();
        off.setX(x1);
        off.setY(y1);
        CTPositiveSize2D ext = t2d.getExt();
        ext.setCx(x2);
        ext.setCy(y2);

        CTPoint2D chOff = t2d.getChOff();
        chOff.setX(x1);
        chOff.setY(y1);
        CTPositiveSize2D chExt = t2d.getChExt();
        chExt.setCx(x2);
        chExt.setCy(y2);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

            blip.addNewBlip().setEmbed("");
            blip.addNewStretch().addNewFillRect();

            CTShapeProperties sppr = pic.addNewSpPr();
            CTTransform2D t2d = sppr.addNewXfrm();
            CTPositiveSize2D ext = t2d.addNewExt();
            //should be original picture width and height expressed in EMUs
            ext.setCx(0);
            ext.setCy(0);

            CTPoint2D off = t2d.addNewOff();
            off.setX(0);
            off.setY(0);
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

            dy2 = (int)(EMU_PER_PIXEL*(ch-delta));
        }
        anchor.setRow2(row2);
        anchor.setDy2(dy2);

        CTPositiveSize2D size2d =  ctPicture.getSpPr().getXfrm().getExt();
        size2d.setCx((long)(scaledWidth*EMU_PER_PIXEL));
        size2d.setCy((long)(scaledHeight*EMU_PER_PIXEL));

        return anchor;
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D

            nvp.setName("Shape 1");
            nv.addNewCNvCxnSpPr();

            CTShapeProperties sp = shape.addNewSpPr();
            CTTransform2D t2d = sp.addNewXfrm();
            CTPositiveSize2D p1 = t2d.addNewExt();
            p1.setCx(0);
            p1.setCy(0);
            CTPoint2D p2 = t2d.addNewOff();
            p2.setX(0);
            p2.setY(0);

            CTPresetGeometry2D geom = sp.addNewPrstGeom();
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.