com.lowagie.text.Image.getPlainWidth()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(253)

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

Image.getPlainWidth介绍

[英]Gets the plain width of the image.
[中]获取图像的纯宽度。

代码示例

代码示例来源:origin: org.docx4j/xhtmlrenderer

public int getWidth() {
  return (int)_image.getPlainWidth();
}

代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf

public int getWidth() {
  return (int)_image.getPlainWidth();
}

代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf-openpdf

public int getWidth() {
  return (int)_image.getPlainWidth();
}

代码示例来源:origin: org.xhtmlrenderer/core-renderer

public int getWidth() {
  return (int)_image.getPlainWidth();
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

public int getWidth() {
  return (int)_image.getPlainWidth();
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * Scales the image to output resolution.<p>
 *
 * @param image the image to scale
 */
private void scaleToOutputResolution(Image image) {
  float factor = m_sharedContext.getDotsPerPixel();
  if (factor != 1.0f) {
    image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
  }
}

代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf

private void scaleToOutputResolution(Image image) {
  float factor = _sharedContext.getDotsPerPixel();
  if (factor != 1.0f) {
    image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
  }
}

代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf-openpdf

private void scaleToOutputResolution(Image image) {
  float factor = _sharedContext.getDotsPerPixel();
  if (factor != 1.0f) {
    image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
  }
}

代码示例来源:origin: org.xhtmlrenderer/core-renderer

private void scaleToOutputResolution(Image image) {
  float factor = _sharedContext.getDotsPerPixel();
  image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
}

代码示例来源:origin: org.docx4j/xhtmlrenderer

private void scaleToOutputResolution(Image image) {
  float factor = _sharedContext.getDotsPerPixel();
  image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
}

代码示例来源:origin: org.nuiton.jrst/jrst

private void scaleToOutputResolution(Image image) {
  float factor = this.sharedContext.getDotsPerPixel();
  image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

private void scaleToOutputResolution(Image image) {
  float factor = _sharedContext.getDotsPerPixel();
  image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
}

代码示例来源:origin: com.haulmont.reports/reports-core

protected void scaleToOutputResolution(Image image) {
  float factor = getSharedContext().getDotsPerPixel();
  image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
}

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

float dpi = shctx.getDotsPerPixel();
if (dpi != 1.0f)
 img.scaleAbsolute(img.getPlainWidth()  * dpi,
          img.getPlainHeight() * dpi);

代码示例来源:origin: org.jboss.itext/itext-rtf

/**
 * Constructs a RtfImage for an Image.
 * 
 * @param doc The RtfDocument this RtfImage belongs to
 * @param image The Image that this RtfImage wraps
 * @throws DocumentException If an error occurred accessing the image content
 */
public RtfImage(RtfDocument doc, Image image) throws DocumentException
{
  super(doc);
  imageType = image.getOriginalType();
  if (!(imageType == Image.ORIGINAL_JPEG || imageType == Image.ORIGINAL_BMP
      || imageType == Image.ORIGINAL_PNG || imageType == Image.ORIGINAL_WMF || imageType == Image.ORIGINAL_GIF)) {
    throw new DocumentException("Only BMP, PNG, WMF, GIF and JPEG images are supported by the RTF Writer");
  }
  alignment = image.getAlignment();
  width = image.getWidth();
  height = image.getHeight();
  plainWidth = image.getPlainWidth();
  plainHeight = image.getPlainHeight();
  this.imageData = getImageData(image);
}

代码示例来源:origin: com.github.bengolder/pdf-rtf

/**
 * Constructs a RtfImage for an Image.
 * 
 * @param doc The RtfDocument this RtfImage belongs to
 * @param image The Image that this RtfImage wraps
 * @throws DocumentException If an error occurred accessing the image content
 */
public RtfImage(RtfDocument doc, Image image) throws DocumentException
{
  super(doc);
  imageType = image.getOriginalType();
  if (!(imageType == Image.ORIGINAL_JPEG || imageType == Image.ORIGINAL_BMP
      || imageType == Image.ORIGINAL_PNG || imageType == Image.ORIGINAL_WMF || imageType == Image.ORIGINAL_GIF)) {
    throw new DocumentException(MessageLocalization.getComposedMessage("only.bmp.png.wmf.gif.and.jpeg.images.are.supported.by.the.rtf.writer"));
  }
  alignment = image.getAlignment();
  width = image.getWidth();
  height = image.getHeight();
  plainWidth = image.getPlainWidth();
  plainHeight = image.getPlainHeight();
  this.imageData = getImageData(image);
}

代码示例来源:origin: jasperreports/jasperreports

xoffset = (int)(xalignFactor * (availableImageWidth - image.getPlainWidth()));
yoffset = (int)(yalignFactor * (availableImageHeight - image.getPlainHeight()));

相关文章

微信公众号

最新文章

更多

Image类方法