com.itextpdf.text.Rectangle.getHeight()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(191)

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

Rectangle.getHeight介绍

[英]Returns the height of the rectangle.
[中]返回矩形的高度。

代码示例

代码示例来源:origin: shopizer-ecommerce/shopizer

int h = (int) (pageSize.getHeight() * 0.95);
PdfContentByte cb = writer.getDirectContent();
PdfTemplate tp = cb.createTemplate(w, h);
float offsetY = (float) ((pageSize.getHeight() - h) / 2);
cb.addTemplate(tp, offsetX, offsetY);

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Gets the bounding height of this template.
 *
 * @return height the bounding height
 */

public float getHeight() {
  return bBox.getHeight();
}

代码示例来源:origin: com.itextpdf/itextg

/**
 * Gets the bounding height of this template.
 *
 * @return height the bounding height
 */

public float getHeight() {
  return bBox.getHeight();
}

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Gets the visibility status of the signature.
 * @return the visibility status of the signature
 */
public boolean isInvisible() {
  return rect == null || rect.getWidth() == 0 || rect.getHeight() == 0;
}

代码示例来源:origin: org.gephi/preview-export-ui

public PageSizeItem(Rectangle pageSize) {
  this.pageSize = pageSize;
  this.inHeight = pageSize.getHeight() / INCH;
  this.inWidth = pageSize.getWidth() / INCH;
  this.mmHeight = pageSize.getHeight() / MM;
  this.mmWidth = pageSize.getWidth() / MM;
}

代码示例来源:origin: com.itextpdf/itextg

/**
 * Gets the visibility status of the signature.
 * @return the visibility status of the signature
 */
public boolean isInvisible() {
  return rect == null || rect.getWidth() == 0 || rect.getHeight() == 0;
}

代码示例来源:origin: youseries/ureport

float tableHeight=pageSize.getHeight()-paper.getTopMargin()-paper.getBottomMargin();
Map<Row, Map<Column, Cell>> cellMap=report.getRowColCellMap();
for(List<Page> pages:list){

代码示例来源:origin: com.itextpdf/itextg

/**
 * Scale the image to the dimensions of the rectangle
 *
 * @param rectangle dimensions to scale the Image
 */
public void scaleAbsolute(final Rectangle rectangle) {
  scaleAbsolute(rectangle.getWidth(), rectangle.getHeight());
}

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Scale the image to the dimensions of the rectangle
 *
 * @param rectangle dimensions to scale the Image
 */
public void scaleAbsolute(final Rectangle rectangle) {
  scaleAbsolute(rectangle.getWidth(), rectangle.getHeight());
}

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Scales the images to the dimensions of the rectangle.
 *
 * @param rectangle the dimensions to fit
 */
public void scaleToFit(final Rectangle rectangle) {
  scaleToFit(rectangle.getWidth(), rectangle.getHeight());
}

代码示例来源:origin: com.itextpdf/itextg

/**
 * Scales the images to the dimensions of the rectangle.
 *
 * @param rectangle the dimensions to fit
 */
public void scaleToFit(final Rectangle rectangle) {
  scaleToFit(rectangle.getWidth(), rectangle.getHeight());
}

代码示例来源:origin: org.technbolts/gutenberg

public Rectangle getDocumentArtBox() {
  return new Rectangle(
      documentMargin.marginLeft,
      documentMargin.marginBottom,
      pageSize.getWidth() - documentMargin.marginRight,
      pageSize.getHeight() - documentMargin.marginTop);
}

代码示例来源:origin: fr.opensagres.xdocreport/fr.opensagres.xdocreport.itext5.extension

protected float getHeaderY( IMasterPageHeaderFooter header )
{
  return document.getPageSize().getHeight() - document.getOriginMarginTop();
}

代码示例来源:origin: com.itextpdf/itextpdf

private void drawTopFrame(PdfAppearance app) {
  app.moveTo(borderWidth, borderWidth);
  app.lineTo(borderWidth, box.getHeight() - borderWidth);
  app.lineTo(box.getWidth() - borderWidth, box.getHeight() - borderWidth);
  app.lineTo(box.getWidth() - 2 * borderWidth, box.getHeight() - 2 * borderWidth);
  app.lineTo(2 * borderWidth, box.getHeight() - 2 * borderWidth);
  app.lineTo(2 * borderWidth, 2 * borderWidth);
  app.lineTo(borderWidth, borderWidth);
  app.fill();
}

代码示例来源:origin: com.itextpdf/itextg

private void drawTopFrame(PdfAppearance app) {
  app.moveTo(borderWidth, borderWidth);
  app.lineTo(borderWidth, box.getHeight() - borderWidth);
  app.lineTo(box.getWidth() - borderWidth, box.getHeight() - borderWidth);
  app.lineTo(box.getWidth() - 2 * borderWidth, box.getHeight() - 2 * borderWidth);
  app.lineTo(2 * borderWidth, box.getHeight() - 2 * borderWidth);
  app.lineTo(2 * borderWidth, 2 * borderWidth);
  app.lineTo(borderWidth, borderWidth);
  app.fill();
}

代码示例来源:origin: org.technbolts/gutenberg

public static void scaleToFit(Image img, Rectangle box) {
  float scaleWidth = box.getWidth() / img.getWidth();
  float scaleHeight = box.getHeight() / img.getHeight();
  float scale = Math.min(scaleHeight, scaleWidth);
  if (scale < 1)
    img.scalePercent(scale * 100f);
}

代码示例来源:origin: com.itextpdf/itextg

public Rectangle(com.itextpdf.text.Rectangle r) {
  r.normalize();
  setBounds(r.getLeft(), r.getBottom(), r.getWidth(), r.getHeight());
}

代码示例来源:origin: com.itextpdf/itextpdf

public Rectangle(com.itextpdf.text.Rectangle r) {
  r.normalize();
  setBounds(r.getLeft(), r.getBottom(), r.getWidth(), r.getHeight());
}

代码示例来源:origin: com.itextpdf/itextpdf

private void drawBottomFrame(PdfAppearance app) {
  app.moveTo(borderWidth, borderWidth);
  app.lineTo(box.getWidth() - borderWidth, borderWidth);
  app.lineTo(box.getWidth() - borderWidth, box.getHeight() - borderWidth);
  app.lineTo(box.getWidth() - 2 * borderWidth, box.getHeight() - 2 * borderWidth);
  app.lineTo(box.getWidth() - 2 * borderWidth, 2 * borderWidth);
  app.lineTo(2 * borderWidth, 2 * borderWidth);
  app.lineTo(borderWidth, borderWidth);
  app.fill();
}
/** Gets the border width in points.

代码示例来源:origin: com.itextpdf/itextg

private void drawBottomFrame(PdfAppearance app) {
  app.moveTo(borderWidth, borderWidth);
  app.lineTo(box.getWidth() - borderWidth, borderWidth);
  app.lineTo(box.getWidth() - borderWidth, box.getHeight() - borderWidth);
  app.lineTo(box.getWidth() - 2 * borderWidth, box.getHeight() - 2 * borderWidth);
  app.lineTo(box.getWidth() - 2 * borderWidth, 2 * borderWidth);
  app.lineTo(2 * borderWidth, 2 * borderWidth);
  app.lineTo(borderWidth, borderWidth);
  app.fill();
}
/** Gets the border width in points.

相关文章