本文整理了Java中com.lowagie.text.Rectangle.getRight
方法的一些代码示例,展示了Rectangle.getRight
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.getRight
方法的具体详情如下:
包路径:com.lowagie.text.Rectangle
类名称:Rectangle
方法名:getRight
[英]Returns the upper right x-coordinate.
[中]返回右上角的x坐标。
代码示例来源:origin: stackoverflow.com
public void onEndPage(PdfWriter writer, Document document)
{
Rectangle rect = writer.getBoxSize("art");
ColumnText.showTextAligned(writer.getDirectContent(),
Element.ALIGN_RIGHT, new Phrase("My static header text"),
rect.getRight(), rect.getTop(), 0);
ColumnText.showTextAligned(writer.getDirectContent(),
Element.ALIGN_CENTER, new Phrase(String.format("page %d", pagenumber)),
(rect.getLeft() + rect.getRight()) / 2, rect.getBottom() - 18, 0);
}
代码示例来源:origin: stackoverflow.com
ColumnText.showTextAligned(writer.getDirectContent(),
Element.ALIGN_RIGHT, header[0],
rect.getRight(), rect.getTop(), 0);
break;
case 1:
(rect.getLeft() + rect.getRight()) / 2, rect.getBottom() - 18, 0);
代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext
/**
* Returns the upper right x-coordinate, considering a given margin.
*
* @param margin
* a margin
* @return the upper right x-coordinate
*/
public float right(float margin) {
return pageSize.getRight(marginRight + margin);
}
代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae
/**
* Returns the upper right x-coordinate.
*
* @return the upper right x-coordinate
*/
public float getRight() {
return super.getRight(cellspacing);
}
代码示例来源:origin: com.github.librepdf/openpdf
/**
* Returns the upper right x-coordinate, considering a given margin.
*
* @param margin
* a margin
* @return the upper right x-coordinate
*/
public float right(float margin) {
return pageSize.getRight(marginRight + margin);
}
代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext
/**
* Returns the upper right x-coordinate.
*
* @return the upper right x-coordinate
*/
public float right() {
return pageSize.getRight(marginRight);
}
代码示例来源:origin: com.github.librepdf/openpdf
/**
* Returns the upper right x-coordinate.
*
* @return the upper right x-coordinate
*/
public float right() {
return pageSize.getRight(marginRight);
}
代码示例来源:origin: com.github.librepdf/openpdf
/**
* Returns the upper right x-coordinate.
*
* @return the upper right x-coordinate
*/
public float getRight() {
return super.getRight(cellspacing);
}
代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae
/**
* Returns the upper right x-coordinate.
*
* @return the upper right x-coordinate
*/
public float right() {
return pageSize.getRight(marginRight);
}
代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae
/**
* Returns the upper right x-coordinate, considering a given margin.
*
* @param margin
* a margin
* @return the upper right x-coordinate
*/
public float right(float margin) {
return pageSize.getRight(marginRight + margin);
}
代码示例来源:origin: stackoverflow.com
public static void show(Rectangle rect) {
System.out.print("llx: ");
System.out.print(rect.getLeft());
System.out.print(", lly: ");
System.out.print(rect.getBottom());
System.out.print(", urx: ");
System.out.print(rect.getRight());
System.out.print(", lly: ");
System.out.print(rect.getTop());
System.out.print(", rotation: ");
System.out.println(rect.getRotation());
}
代码示例来源:origin: org.xhtmlrenderer/core-renderer
private com.lowagie.text.Rectangle add(com.lowagie.text.Rectangle r1, com.lowagie.text.Rectangle r2) {
float llx = Math.min(r1.getLeft(), r2.getLeft());
float urx = Math.max(r1.getRight(), r2.getRight());
float lly = Math.min(r1.getBottom(), r2.getBottom());
float ury = Math.max(r1.getTop(), r2.getTop());
return new com.lowagie.text.Rectangle(llx, lly, urx, ury);
}
代码示例来源:origin: org.xhtmlrenderer/flying-saucer-pdf
private com.lowagie.text.Rectangle add(com.lowagie.text.Rectangle r1, com.lowagie.text.Rectangle r2) {
float llx = Math.min(r1.getLeft(), r2.getLeft());
float urx = Math.max(r1.getRight(), r2.getRight());
float lly = Math.min(r1.getBottom(), r2.getBottom());
float ury = Math.max(r1.getTop(), r2.getTop());
return new com.lowagie.text.Rectangle(llx, lly, urx, ury);
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer
private com.lowagie.text.Rectangle add(com.lowagie.text.Rectangle r1, com.lowagie.text.Rectangle r2) {
float llx = Math.min(r1.getLeft(), r2.getLeft());
float urx = Math.max(r1.getRight(), r2.getRight());
float lly = Math.min(r1.getBottom(), r2.getBottom());
float ury = Math.max(r1.getTop(), r2.getTop());
return new com.lowagie.text.Rectangle(llx, lly, urx, ury);
}
代码示例来源:origin: com.github.librepdf/openpdf
/**
* Constructs a <CODE>PdfRectangle</CODE>-object with a <CODE>Rectangle</CODE>-object.
*
* @param rectangle a <CODE>Rectangle</CODE>
*/
public PdfRectangle(Rectangle rectangle, int rotation) {
this(rectangle.getLeft(), rectangle.getBottom(), rectangle.getRight(), rectangle.getTop(), rotation);
}
代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext
/**
* Constructs a <CODE>PdfRectangle</CODE>-object with a <CODE>Rectangle</CODE>-object.
*
* @param rectangle a <CODE>Rectangle</CODE>
*/
public PdfRectangle(Rectangle rectangle, int rotation) {
this(rectangle.getLeft(), rectangle.getBottom(), rectangle.getRight(), rectangle.getTop(), rotation);
}
代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-printing
@Override
public String toString() {
return getClass().getSimpleName() + " [" + (int) getBounds().getLeft() + " : " + (int) getBounds().getRight()
+ "] x [" + (int) getBounds().getBottom() + " : " + (int) getBounds().getTop() + "]";
}
代码示例来源:origin: stackoverflow.com
public class MyBorder implements PdfPCellEvent {
public void cellLayout(PdfPCell cell, Rectangle position,
PdfContentByte[] canvases) {
float x1 = position.getLeft() + 2;
float x2 = position.getRight() - 2;
float y1 = position.getTop() - 2;
float y2 = position.getBottom() + 2;
PdfContentByte canvas = canvases[PdfPTable.LINECANVAS];
canvas.rectangle(x1, y1, x2 - x1, y2 - y1);
canvas.stroke();
}
}
代码示例来源: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 rect, PdfContentByte[] canvases) {
if (cellField == null || (fieldWriter == null && parent == null)) throw new IllegalArgumentException(MessageLocalization.getComposedMessage("you.have.used.the.wrong.constructor.for.this.fieldpositioningevents.class"));
cellField.put(PdfName.RECT, new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
if (parent == null)
fieldWriter.addAnnotation(cellField);
else
parent.addKid(cellField);
}
}
代码示例来源: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 rect, PdfContentByte[] canvases) {
if (cellField == null || (fieldWriter == null && parent == null)) throw new IllegalArgumentException(MessageLocalization.getComposedMessage("you.have.used.the.wrong.constructor.for.this.fieldpositioningevents.class"));
cellField.put(PdfName.RECT, new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
if (parent == null)
fieldWriter.addAnnotation(cellField);
else
parent.addKid(cellField);
}
}
内容来源于网络,如有侵权,请联系作者删除!