Package org.openxmlformats.schemas.drawingml.x2006.main

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


            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


         
          CTPositiveSize2D ext = xfrm.addNewExt();
          ext.setCx(width);
          ext.setCy(height);
         
          CTPresetGeometry2D prstGeom = spPr.addNewPrstGeom();
          prstGeom.setPrst(STShapeType.RECT);
          prstGeom.addNewAvLst();
         
          // Finish up
          XWPFPicture xwpfPicture = new XWPFPicture(pic, paragraph);
          pictures.add(xwpfPicture);
          return xwpfPicture;
View Full Code Here

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

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

            prototype = pic;
        }
        return prototype;
    }
View Full Code Here

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

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

            prototype = pic;
        }
        return prototype;
    }
View Full Code Here

          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();
         
          // Finish up
          XWPFPicture xwpfPicture = new XWPFPicture(pic, paragraph);
View Full Code Here

            CTBlipFillProperties blip = pic.addNewBlipFill();
            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);

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

            prototype = pic;
        }
View Full Code Here

            CTBlipFillProperties blip = pic.addNewBlipFill();
            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);

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

            prototype = pic;
        }
View Full Code Here

  }

  private void extractShapeContent(StringBuilder buffy, CTGroupShape gs) {
    CTShape[] shapes = gs.getSpArray();
    for (CTShape shape : shapes) {
      CTTextBody textBody = shape.getTxBody();
      if (textBody != null) {
        CTTextParagraph[] paras = textBody.getPArray();
        for (CTTextParagraph textParagraph : paras) {
          CTRegularTextRun[] textRuns = textParagraph.getRArray();
          for (CTRegularTextRun textRun : textRuns) {
            buffy.append(textRun.getT()).append(' ');
          }
View Full Code Here

    private void extractShapeContent(CTGroupShape gs, XHTMLContentHandler xhtml)
            throws SAXException {
        CTShape[] shapes = gs.getSpArray();
        for (CTShape shape : shapes) {
            CTTextBody textBody = shape.getTxBody();
            if (textBody != null) {
                CTTextParagraph[] paras = textBody.getPArray();
                for (CTTextParagraph textParagraph : paras) {
                    CTRegularTextRun[] textRuns = textParagraph.getRArray();
                    for (CTRegularTextRun textRun : textRuns) {
                        xhtml.element("p", textRun.getT());
                    }
View Full Code Here

      CTNonVisualDrawingProps props = nvGraphic.addNewCNvPr();
      props.setId(0);
      props.setName("Diagramm 1");
      nvGraphic.addNewCNvGraphicFramePr();

      CTTransform2D transform = graphicFrame.addNewXfrm();
      CTPositiveSize2D extPoint = transform.addNewExt();
      CTPoint2D offPoint = transform.addNewOff();

      extPoint.setCx(0);
      extPoint.setCy(0);
      offPoint.setX(0);
      offPoint.setY(0);
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObject

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.