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

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

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

XSSFPicture.getDrawing介绍

暂无

代码示例

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

public XSSFDrawing getDrawing() {
  return _picture.getDrawing();
}

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

/**
 * @return the sheet which contains the picture shape
 */
@Override
public XSSFSheet getSheet() {
  return (XSSFSheet)getDrawing().getParent();
}

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

/**
 * Return picture data for this shape
 *
 * @return picture data for this shape
 */
public XSSFPictureData getPictureData() {
  String blipId = ctPicture.getBlipFill().getBlip().getEmbed();
  return  (XSSFPictureData)getDrawing().getRelationById(blipId);
}

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

public XSSFDrawing getDrawing() {
  return _picture.getDrawing();
}

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

/**
 * @return the sheet which contains the picture shape
 */
@Override
public XSSFSheet getSheet() {
  return (XSSFSheet)getDrawing().getParent();
}

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

private float getRowHeightInPixels(int rowIndex){
  XSSFSheet sheet = (XSSFSheet)getDrawing().getParent();
  XSSFRow row = sheet.getRow(rowIndex);
  float height = row != null ?  row.getHeightInPoints() : sheet.getDefaultRowHeightInPoints();
  return height*PIXEL_DPI/POINT_DPI;
}

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

/**
 * Return picture data for this shape
 *
 * @return picture data for this shape
 */
public XSSFPictureData getPictureData() {
  String blipId = ctPicture.getBlipFill().getBlip().getEmbed();
  return  (XSSFPictureData)getDrawing().getRelationById(blipId);
}

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

private float getColumnWidthInPixels(int columnIndex){
  XSSFSheet sheet = (XSSFSheet)getDrawing().getParent();
  CTCol col = sheet.getColumnHelper().getColumn(columnIndex, false);
  double numChars = col == null || !col.isSetWidth() ? DEFAULT_COLUMN_WIDTH : col.getWidth();
  return (float)numChars*XSSFWorkbook.DEFAULT_CHARACTER_WIDTH;
}

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

/**
 * Return picture data for this shape
 *
 * @return picture data for this shape
 */
public XSSFPictureData getPictureData() {
  String blipId = ctPicture.getBlipFill().getBlip().getEmbed();
  for (POIXMLDocumentPart part : getDrawing().getRelations()) {
    if(part.getPackageRelationship().getId().equals(blipId)){
      return (XSSFPictureData)part;
    }
  }
  logger.log(POILogger.WARN, "Picture data was not found for blipId=" + blipId);
  return null;
}

相关文章