Examples of CTBlip


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

        XSLFBackground bgShape = getBackground();
        if(bgShape != null) {
            CTBackground bg = (CTBackground)bgShape.getXmlObject();
            if(bg.isSetBgPr() && bg.getBgPr().isSetBlipFill()){
                CTBlip blip = bg.getBgPr().getBlipFill().getBlip();
                String blipId = blip.getEmbed();

                String relId = importBlip(blipId, src.getPackagePart());
                blip.setEmbed(relId);
            }
        }
        return this;
    }
View Full Code Here

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

        cnv.setId(shapeId + 1);
        nvSpPr.addNewCNvPicPr().addNewPicLocks().setNoChangeAspect(true);
        nvSpPr.addNewNvPr();

        CTBlipFillProperties blipFill = ct.addNewBlipFill();
        CTBlip blip = blipFill.addNewBlip();
        blip.setEmbed(rel);
        blipFill.addNewStretch().addNewFillRect();

        CTShapeProperties spPr = ct.addNewSpPr();
        CTPresetGeometry2D prst = spPr.addNewPrstGeom();
        prst.setPrst(STShapeType.RECT);
View Full Code Here

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

        XSLFPictureShape p = (XSLFPictureShape)sh;
        String blipId = p.getBlipId();
        String relId = getSheet().importBlip(blipId, p.getSheet().getPackagePart());

        CTPicture ct = (CTPicture)getXmlObject();
        CTBlip blip = ct.getBlipFill().getBlip();
        blip.setEmbed(relId);

        CTApplicationNonVisualDrawingProps nvPr = ct.getNvPicPr().getNvPr();
        if(nvPr.isSetCustDataLst()) {
            // discard any custom tags associated with the picture being copied
            nvPr.unsetCustDataLst();
        }
        if(blip.isSetExtLst()) {

            CTOfficeArtExtensionList extLst = blip.getExtLst();
            for(CTOfficeArtExtension ext : extLst.getExtArray()){
                String xpath = "declare namespace a14='http://schemas.microsoft.com/office/drawing/2010/main' $this//a14:imgProps/a14:imgLayer";
                XmlObject[] obj = ext.selectPath(xpath);
                if(obj != null && obj.length == 1){
                    XmlCursor c = obj[0].newCursor();
View Full Code Here

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

    }

    private Paint createTexturePaint(CTBlipFillProperties blipFill, Graphics2D graphics,
            PackagePart parentPart){
        Paint paint = null;
        CTBlip blip = blipFill.getBlip();
        String blipId = blip.getEmbed();
        PackageRelationship rel = parentPart.getRelationship(blipId);
        if (rel != null) {
            XSLFImageRenderer renderer = null;
            if (graphics != null)
                renderer = (XSLFImageRenderer) graphics.getRenderingHint(XSLFRenderingHint.IMAGE_RENDERER);
            if (renderer == null) renderer = new XSLFImageRenderer();

            try {
                BufferedImage img = renderer.readImage(parentPart.getRelatedPart(rel));
                if (blip.sizeOfAlphaModFixArray() > 0) {
                    float alpha = blip.getAlphaModFixArray(0).getAmt() / 100000.f;
                    AlphaComposite ac = AlphaComposite.getInstance(
                            AlphaComposite.SRC_OVER, alpha);
                    if (graphics != null) graphics.setComposite(ac);
                }
View Full Code Here

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

            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();
View Full Code Here

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

        cnv.setId(shapeId + 1);
        nvSpPr.addNewCNvPicPr().addNewPicLocks().setNoChangeAspect(true);
        nvSpPr.addNewNvPr();

        CTBlipFillProperties blipFill = ct.addNewBlipFill();
        CTBlip blip = blipFill.addNewBlip();
        blip.setEmbed(rel);
        blipFill.addNewStretch().addNewFillRect();

        CTShapeProperties spPr = ct.addNewSpPr();
        CTPresetGeometry2D prst = spPr.addNewPrstGeom();
        prst.setPrst(STShapeType.RECT);
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.