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

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

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

Rectangle.setTop介绍

[英]Sets the upper right y-coordinate.
[中]

代码示例

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

/**
 * Sets the bounding height of this template.
 *
 * @param height the bounding height
 */

public void setHeight(float height) {
  bBox.setBottom(0);
  bBox.setTop(height);
}

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

/**
 * Sets the bounding height of this template.
 *
 * @param height the bounding height
 */

public void setHeight(float height) {
  bBox.setBottom(0);
  bBox.setTop(height);
}

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

/**
 * Gets a Rectangle that is altered to fit on the page.
 *
 * @param top        the top position
 * @param bottom    the bottom position
 * @return a <CODE>Rectangle</CODE>
 */
public Rectangle rectangle(final float top, final float bottom) {
  Rectangle tmp = new Rectangle(this);
  if (getTop() > top) {
    tmp.setTop(top);
    tmp.disableBorderSide(TOP);
  }
  if (getBottom() < bottom) {
    tmp.setBottom(bottom);
    tmp.disableBorderSide(BOTTOM);
  }
  return tmp;
}

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

/**
 * Gets a Rectangle that is altered to fit on the page.
 *
 * @param top        the top position
 * @param bottom    the bottom position
 * @return a <CODE>Rectangle</CODE>
 */
public Rectangle rectangle(final float top, final float bottom) {
  Rectangle tmp = new Rectangle(this);
  if (getTop() > top) {
    tmp.setTop(top);
    tmp.disableBorderSide(TOP);
  }
  if (getBottom() < bottom) {
    tmp.setBottom(bottom);
    tmp.disableBorderSide(BOTTOM);
  }
  return tmp;
}

代码示例来源:origin: danmbox/briss2

scaledBox.setRight(smallestBox.getLeft()
    + (smallestBox.getWidth() * (1 - rotRatios[2])));
scaledBox.setTop(smallestBox.getBottom()
    + (smallestBox.getHeight() * (1 - rotRatios[3])));

代码示例来源:origin: danmbox/briss2

scaledBox.setRight(smallestBox.getLeft()
    + (smallestBox.getWidth() * (1 - rotRatios[2])));
scaledBox.setTop(smallestBox.getBottom()
    + (smallestBox.getHeight() * (1 - rotRatios[3])));

相关文章