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

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

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

Rectangle.cloneNonPositionParameters介绍

[英]Copies each of the parameters, except the position, from a Rectangle object
[中]从Rectangle对象复制每个参数(位置除外)

代码示例

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

/**
 * Constructs a <CODE>Rectangle</CODE> -object.
 * 
 * @param rect
 *          another <CODE>Rectangle</CODE>
 */
public Rectangle(Rectangle rect) {
 this(rect.llx, rect.lly, rect.urx, rect.ury);
 cloneNonPositionParameters(rect);
}

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

/**
 * Constructs a <CODE>RectangleReadOnly</CODE> -object.
 * 
 * @param rect    another <CODE>Rectangle</CODE>
 */
public RectangleReadOnly(Rectangle rect) {
  super(rect.llx, rect.lly, rect.urx, rect.ury);
  super.cloneNonPositionParameters(rect);
}

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

/**
 * Constructs a <CODE>Rectangle</CODE> -object.
 * 
 * @param rect    another <CODE>Rectangle</CODE>
 */
public Rectangle(Rectangle rect) {
  this(rect.llx, rect.lly, rect.urx, rect.ury);
  cloneNonPositionParameters(rect);
}

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

/**
 * Constructs a <CODE>RectangleReadOnly</CODE> -object.
 * 
 * @param rect    another <CODE>Rectangle</CODE>
 */
public RectangleReadOnly(Rectangle rect) {
  super(rect.llx, rect.lly, rect.urx, rect.ury);
  super.cloneNonPositionParameters(rect);
}

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

/**
 * Constructs a <CODE>Rectangle</CODE> -object.
 * 
 * @param rect    another <CODE>Rectangle</CODE>
 */
public Rectangle(Rectangle rect) {
  this(rect.llx, rect.lly, rect.urx, rect.ury);
  cloneNonPositionParameters(rect);
}

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

/**
 * Constructs a <CODE>RectangleReadOnly</CODE> -object.
 * 
 * @param rect    another <CODE>Rectangle</CODE>
 */
public RectangleReadOnly(Rectangle rect) {
  super(rect.llx, rect.lly, rect.urx, rect.ury);
  super.cloneNonPositionParameters(rect);
}

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

/**
 * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])
 */
public void cellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) {
  float sp_left = spacing_left;
  if (Float.isNaN(sp_left)) sp_left = 0f;
  float sp_right = spacing_right;
  if (Float.isNaN(sp_right)) sp_right = 0f;
  float sp_top = spacing_top;
  if (Float.isNaN(sp_top)) sp_top = 0f;
  float sp_bottom = spacing_bottom;
  if (Float.isNaN(sp_bottom)) sp_bottom = 0f;
  Rectangle rect = new Rectangle(position.getLeft(sp_left), position.getBottom(sp_bottom), position.getRight(sp_right), position.getTop(sp_top));
  rect.cloneNonPositionParameters(this);
  canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
  rect.setBackgroundColor(null);
  canvases[PdfPTable.LINECANVAS].rectangle(rect);
}

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

/**
 * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])
 */
public void cellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) {
  float sp_left = spacing_left;
  if (Float.isNaN(sp_left)) sp_left = 0f;
  float sp_right = spacing_right;
  if (Float.isNaN(sp_right)) sp_right = 0f;
  float sp_top = spacing_top;
  if (Float.isNaN(sp_top)) sp_top = 0f;
  float sp_bottom = spacing_bottom;
  if (Float.isNaN(sp_bottom)) sp_bottom = 0f;
  Rectangle rect = new Rectangle(position.getLeft(sp_left), position.getBottom(sp_bottom), position.getRight(sp_right), position.getTop(sp_top));
  rect.cloneNonPositionParameters(this);
  canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
  rect.setBackgroundColor(null);
  canvases[PdfPTable.LINECANVAS].rectangle(rect);
}

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

/**
 * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])
 */
public void cellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) {
  float sp_left = spacing_left;
  if (Float.isNaN(sp_left)) sp_left = 0f;
  float sp_right = spacing_right;
  if (Float.isNaN(sp_right)) sp_right = 0f;
  float sp_top = spacing_top;
  if (Float.isNaN(sp_top)) sp_top = 0f;
  float sp_bottom = spacing_bottom;
  if (Float.isNaN(sp_bottom)) sp_bottom = 0f;
  Rectangle rect = new Rectangle(position.getLeft(sp_left), position.getBottom(sp_bottom), position.getRight(sp_right), position.getTop(sp_top));
  rect.cloneNonPositionParameters(this);
  canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
  rect.setBackgroundColor(null);
  canvases[PdfPTable.LINECANVAS].rectangle(rect);
}

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

/**
 * @see com.lowagie.text.pdf.PdfPTableEvent#tableLayout(com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])
 */
public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases) {
  float[] width = widths[0];
  Rectangle rect = new Rectangle(width[0], heights[heights.length - 1], width[width.length - 1], heights[0]);
  rect.cloneNonPositionParameters(this);
  int bd = rect.getBorder();
  rect.setBorder(Rectangle.NO_BORDER);
  canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
  rect.setBorder(bd);
  rect.setBackgroundColor(null);
  canvases[PdfPTable.LINECANVAS].rectangle(rect);
}

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

/**
 * @see com.lowagie.text.pdf.PdfPTableEvent#tableLayout(com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])
 */
public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases) {
  float[] width = widths[0];
  Rectangle rect = new Rectangle(width[0], heights[heights.length - 1], width[width.length - 1], heights[0]);
  rect.cloneNonPositionParameters(this);
  int bd = rect.getBorder();
  rect.setBorder(Rectangle.NO_BORDER);
  canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
  rect.setBorder(bd);
  rect.setBackgroundColor(null);
  canvases[PdfPTable.LINECANVAS].rectangle(rect);
}

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

/**
 * @see com.lowagie.text.pdf.PdfPTableEvent#tableLayout(com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])
 */
public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases) {
  float[] width = widths[0];
  Rectangle rect = new Rectangle(width[0], heights[heights.length - 1], width[width.length - 1], heights[0]);
  rect.cloneNonPositionParameters(this);
  int bd = rect.getBorder();
  rect.setBorder(Rectangle.NO_BORDER);
  canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
  rect.setBorder(bd);
  rect.setBackgroundColor(null);
  canvases[PdfPTable.LINECANVAS].rectangle(rect);
}

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

/**
 * 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(float top, float bottom) {
  Rectangle tmp = new Rectangle(getLeft(), getBottom(), getRight(), getTop());
  tmp.cloneNonPositionParameters(this);
  if (getTop() > top) {
    tmp.setTop(top);
    tmp.setBorder(border - (border & TOP));
  }
  if (getBottom() < bottom) {
    tmp.setBottom(bottom);
    tmp.setBorder(border - (border & BOTTOM));
  }
  return tmp;
}

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

/**
 * 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(float top, float bottom) {
  Rectangle tmp = new Rectangle(getLeft(), getBottom(), getRight(), getTop());
  tmp.cloneNonPositionParameters(this);
  if (getTop() > top) {
    tmp.setTop(top);
    tmp.setBorder(border - (border & TOP));
  }
  if (getBottom() < bottom) {
    tmp.setBottom(bottom);
    tmp.setBorder(border - (border & BOTTOM));
  }
  return tmp;
}

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

/**
 * 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(float top, float bottom) {
  Rectangle tmp = new Rectangle(getLeft(), getBottom(), getRight(), getTop());
  tmp.cloneNonPositionParameters(this);
  if (getTop() > top) {
    tmp.setTop(top);
    tmp.setBorder(border - (border & TOP));
  }
  if (getBottom() < bottom) {
    tmp.setBottom(bottom);
    tmp.setBorder(border - (border & BOTTOM));
  }
  return tmp;
}

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

Rectangle newRect = new Rectangle(left, bottom, right, top);
newRect.cloneNonPositionParameters(cell);
newRect.setBackgroundColor(null);

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

Rectangle newRect = new Rectangle(left, bottom, right, top);
newRect.cloneNonPositionParameters(cell);
newRect.setBackgroundColor(null);

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

Rectangle newRect = new Rectangle(left, bottom, right, top);
newRect.cloneNonPositionParameters(cell);
newRect.setBackgroundColor(null);

相关文章

微信公众号

最新文章

更多