Examples of CTPositiveSize2D


Examples of org.docx4j.dml.CTPositiveSize2D

    return docfrag;
    }
   
    private void readDimensions() {
      CTPositiveSize2D size2d = getExtent();
      if (size2d==null) {
        log.warn("wp:inline/wp:extent missing!");
        return;
      }
      dimensions = new Dimensions();
      if (size2d.getCx()!=0) {
        dimensions.width= (int) size2d.getCx() / extentToPixelConversionFactor;
        dimensions.widthUnit = "px";
      }
      if (size2d.getCy()!=0) {
        dimensions.height= (int) size2d.getCy() / extentToPixelConversionFactor;
        dimensions.heightUnit = "px";
      }     
    }
View Full Code Here

Examples of org.docx4j.dml.CTPositiveSize2D

                        CTPoint2D point2d = dmlObjectFactory.createCTPoint2D();
                        transform2d.setOff(point2d);
                            point2d.setY( 0 );
                            point2d.setX( 0 );
                        // Create object for ext
                        CTPositiveSize2D positivesize2d = dmlObjectFactory.createCTPositiveSize2D();
                        transform2d.setExt(positivesize2d);
                            positivesize2d.setCx( 714375 );
                            positivesize2d.setCy( 714375 );
                    // Create object for prstGeom
                    CTPresetGeometry2D presetgeometry2d = dmlObjectFactory.createCTPresetGeometry2D();
                    shapeproperties.setPrstGeom(presetgeometry2d);
                        // Create object for avLst
                        CTGeomGuideList geomguidelist = dmlObjectFactory.createCTGeomGuideList();
View Full Code Here

Examples of org.docx4j.dml.CTPositiveSize2D

//        <a:off x="1524000" y="1397000"/>
//        <a:ext cx="6096000" cy="741680"/>
//      </p:xfrm>
    graphicFrame.setXfrm(xfrm);
   
    CTPositiveSize2D ext = dmlFactory.createCTPositiveSize2D();
    ext.setCx(6096000);
    ext.setCy(741680);
   
    xfrm.setExt(ext);
   
    CTPoint2D off = dmlFactory.createCTPoint2D();
    xfrm.setOff(off);
View Full Code Here

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

      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);

      CTGraphicalObject graphic = graphicFrame.addNewGraphic();
View Full Code Here

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

          CTNonVisualDrawingProps docPr = inline.addNewDocPr();
          docPr.setId(picNumber);
          docPr.setName("Picture " + picNumber);
          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();
          cNvPr.setId(picNumber);
          cNvPr.setName("Picture " + picNumber);
          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

            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

            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
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.