/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.setParent(this); shape.setAnchor(anchor); shape.setPictureIndex(pictureIndex); shapes.add(shape); onCreate(shape); EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID); if (shape.getAnchor().isHorizontallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ); } if (shape.getAnchor().isVerticallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT); } return shape; }
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.setParent(this); shape.setAnchor(anchor); shape.setPictureIndex(pictureIndex); shapes.add(shape); onCreate(shape); EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID); if (shape.getAnchor().isHorizontallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ); } if (shape.getAnchor().isVerticallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT); } return shape; }
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.setParent(this); shape.setAnchor(anchor); shape.setPictureIndex(pictureIndex); shapes.add(shape); onCreate(shape); EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID); if (shape.getAnchor().isHorizontallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ); } if (shape.getAnchor().isVerticallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT); } return shape; }