本文整理了Java中org.apache.poi.hssf.usermodel.HSSFPicture.setAnchor()
方法的一些代码示例,展示了HSSFPicture.setAnchor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFPicture.setAnchor()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFPicture
类名称:HSSFPicture
方法名:setAnchor
暂无
代码示例来源:origin: org.apache.poi/poi
/**
* 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;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* 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;
}
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* 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;
}
内容来源于网络,如有侵权,请联系作者删除!