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

x33g5p2x  于2022-01-28 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(166)

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

Rectangle.getHeight介绍

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

代码示例

代码示例来源:origin: com.github.librepdf/openpdf

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

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

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

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

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

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

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

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

代码示例来源:origin: com.github.librepdf/openpdf

/**
 * 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: com.github.bengolder/pdf-rtf

/**
   * This method compares to Rectangles. They are considered equal if width and height are the same
   * 
   * @param rect1 The first Rectangle to compare
   * @param rect2 The second Rectangle to compare
   * @return <code>True</code> if the Rectangles equal, <code>false</code> otherwise
   */
  private boolean rectEquals(Rectangle rect1, Rectangle rect2) {
    return (rect1.getWidth() == rect2.getWidth()) && (rect1.getHeight() == rect2.getHeight());
  }
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

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

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

/**
 * 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: es.gob.afirma/afirma-crypto-pdf-itext

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.geomajas.plugin/geomajas-plugin-printing

/**
 * Initializes context size.
 *
 * @param rectangle rectangle
 */
public void initSize(Rectangle rectangle) {
  template = writer.getDirectContent().createTemplate(rectangle.getWidth(), rectangle.getHeight());
}

代码示例来源:origin: fr.opensagres.xdocreport/fr.opensagres.poi.xwpf.converter.pdf

@Override
protected float getHeaderY( IMasterPageHeaderFooter header )
{
  Float headerY = ( (StylableHeaderFooter) header ).getY();
  if ( headerY != null )
  {
    return document.getPageSize().getHeight() - headerY;
  }
  return super.getHeaderY( header );
}

代码示例来源:origin: fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.pdf

@Override
protected float getHeaderY( IMasterPageHeaderFooter header )
{
  Float headerY = ( (StylableHeaderFooter) header ).getY();
  if ( headerY != null )
  {
    return document.getPageSize().getHeight() - headerY;
  }
  return super.getHeaderY( header );
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-printing

@Override
public void calculateSize(PdfContext context) {
  Rectangle textSize = context.getTextSize(label, getLegend().getFont());
  float margin = 0.25f * getLegend().getFont().getSize();
  getConstraint().setMarginX(margin);
  getConstraint().setMarginY(margin);
  setBounds(new Rectangle(textSize.getHeight(), textSize.getHeight()));
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-printing

@Override
public void calculateSize(PdfContext context) {
  Rectangle textSize = context.getTextSize(getText(), getFont());
  margin = 0.25f * getFont().getSize();
  setBounds(new Rectangle(textSize.getWidth() + 2 * margin, textSize.getHeight() + 2 * margin));
}

代码示例来源:origin: com.github.librepdf/openpdf

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: fr.opensagres.xdocreport.itext-gae/itext-gae

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: es.gob.afirma/afirma-crypto-pdf-itext

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: org.geomajas.plugin/geomajas-plugin-printing

private float getPageSizeRelativeToA3(PrintGetTemplateRequest request) {
  Rectangle r;
  if (request.getPageSize() != null) {
    r = PageSize.getRectangle(request.getPageSize());
  } else {
    float width = request.getTemplate().getPage().getLayoutConstraint().getWidth();
    float height = request.getTemplate().getPage().getLayoutConstraint().getHeight();
    r = new Rectangle(0, 0, width, height);
  }
  return (r.getWidth() / PageSize.A3.getWidth() + r.getHeight() / PageSize.A3.getHeight()) / 2;
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-printing

public void fillRoundRectangle(Rectangle rect, Color color, float r) {
  template.saveState();
  setFill(color);
  template.roundRectangle(origX + rect.getLeft(), origY + rect.getBottom(), rect.getWidth(), rect.getHeight(), r);
  template.fill();
  template.restoreState();
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-printing

public void setSize(String size, boolean landscape) {
  Rectangle rect = null;
  if (landscape) {
    rect = PageSize.getRectangle(size).rotate();
  } else {
    rect = PageSize.getRectangle(size);
  }
  setBounds(rect);
  getConstraint().setWidth(rect.getWidth());
  getConstraint().setHeight(rect.getHeight());
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-printing

Envelope createBbox() {
  double x1 = getMap().getLocation().x;
  double x2 = x1 + (getBounds().getWidth() / getMap().getPpUnit());
  double y1 = getMap().getLocation().y;
  double y2 = y1 + (getBounds().getHeight() / getMap().getPpUnit());
  return new Envelope(x1, x2, y1, y2);
}

相关文章

微信公众号

最新文章

更多