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

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

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

XSSFPicture.getClientAnchor介绍

暂无

代码示例

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

/**
 * Calculate the preferred size for this picture.
 *
 * @param scaleX the amount by which image width is multiplied relative to the original width.
 * @param scaleY the amount by which image height is multiplied relative to the original height.
 * @return XSSFClientAnchor with the preferred size for this image
 */
public XSSFClientAnchor getPreferredSize(double scaleX, double scaleY){
  Dimension dim = ImageUtils.setPreferredSize(this, scaleX, scaleY);
  CTPositiveSize2D size2d =  ctPicture.getSpPr().getXfrm().getExt();
  size2d.setCx((int)dim.getWidth());
  size2d.setCy((int)dim.getHeight());
  return getClientAnchor();
}

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

XSSFClientAnchor anchor = getClientAnchor();
XSSFClientAnchor pref = getPreferredSize(scaleX,scaleY);
if (anchor == null || pref == null) {

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

/**
 * Calculate the preferred size for this picture.
 *
 * @param scaleX the amount by which image width is multiplied relative to the original width.
 * @param scaleY the amount by which image height is multiplied relative to the original height.
 * @return XSSFClientAnchor with the preferred size for this image
 */
public XSSFClientAnchor getPreferredSize(double scaleX, double scaleY){
  Dimension dim = ImageUtils.setPreferredSize(this, scaleX, scaleY);
  CTPositiveSize2D size2d =  ctPicture.getSpPr().getXfrm().getExt();
  size2d.setCx((int)dim.getWidth());
  size2d.setCy((int)dim.getHeight());
  return getClientAnchor();
}

代码示例来源:origin: stackoverflow.com

XSSFDrawing dp = wb.getSheetAt(0).createDrawingPatriarch();
List<XSSFShape> pics = dp.getShapes();
XSSFPicture inpPic = (XSSFPicture)pics.get(0);

XSSFClientAnchor clientAnchor = inpPic.getClientAnchor();

System.out.println("col1: " + clientAnchor.getCol1() + ", col2: " + clientAnchor.getCol2() + ", row1: " + clientAnchor.getRow1() + ", row2: " + clientAnchor.getRow2());
System.out.println("x1: " + clientAnchor.getDx1() + ", x2: " + clientAnchor.getDx2() +  ", y1: " + clientAnchor.getDy1() +  ", y2: " + clientAnchor.getDy2());

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

XSSFClientAnchor anchor = getClientAnchor();
XSSFClientAnchor pref = getPreferredSize(scaleX,scaleY);
if (anchor == null || pref == null) {

相关文章