org.apache.poi.xssf.usermodel.XSSFPicture.getAnchor()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(193)

本文整理了Java中org.apache.poi.xssf.usermodel.XSSFPicture.getAnchor()方法的一些代码示例,展示了XSSFPicture.getAnchor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFPicture.getAnchor()方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFPicture
类名称:XSSFPicture
方法名:getAnchor

XSSFPicture.getAnchor介绍

暂无

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * @return the anchor that is used by this shape.
 */
@Override
public XSSFClientAnchor getClientAnchor() {
  XSSFAnchor a = getAnchor();
  return (a instanceof XSSFClientAnchor) ? (XSSFClientAnchor)a : null;
}

代码示例来源:origin: org.apache.poi/poi-ooxml

@Override
public XSSFAnchor getAnchor() {
  return _picture.getAnchor();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * @return the anchor that is used by this shape.
 */
@Override
public XSSFClientAnchor getClientAnchor() {
  XSSFAnchor a = getAnchor();
  return (a instanceof XSSFClientAnchor) ? (XSSFClientAnchor)a : null;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@Override
public XSSFAnchor getAnchor() {
  return _picture.getAnchor();
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

XSSFClientAnchor anchor = (XSSFClientAnchor)getAnchor();

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Reset the image to the original size.
 * <p>
 * Please note, that this method works correctly only for workbooks
 * with the default font size (Calibri 11pt for .xlsx).
 * If the default font is changed the resized image can be streched vertically or horizontally.
 * </p>
 *
 * @param scale the amount by which image dimensions are multiplied relative to the original size.
 * <code>resize(1.0)</code> sets the original size, <code>resize(0.5)</code> resize to 50% of the original,
 * <code>resize(2.0)</code> resizes to 200% of the original.
 */
public void resize(double scale){
  XSSFClientAnchor anchor = (XSSFClientAnchor)getAnchor();
  XSSFClientAnchor pref = getPreferredSize(scale);
  int row2 = anchor.getRow1() + (pref.getRow2() - pref.getRow1());
  int col2 = anchor.getCol1() + (pref.getCol2() - pref.getCol1());
  anchor.setCol2(col2);
  anchor.setDx1(0);
  anchor.setDx2(pref.getDx2());
  anchor.setRow2(row2);
  anchor.setDy1(0);
  anchor.setDy2(pref.getDy2());
}

相关文章