org.foray.pdf.object
Class PDFRectangle

java.lang.Object
  extended by org.foray.pdf.object.PDFRectangle

public class PDFRectangle
extends Object

A PDF rectangle. Rectangles are specified on page 183 of the PDF 1.3 spec.


Constructor Summary
PDFRectangle(int[] array)
          Create a rectangle from an array of four values.
PDFRectangle(int llx, int lly, int urx, int ury)
          Create a rectangle from its coordinates.
 
Method Summary
 byte[] toPDF()
          Produce the PDF representation for the object.
 String toPDFString()
          Returns the description of the rectangle suitable for embedding in the PDF document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFRectangle

public PDFRectangle(int llx,
                    int lly,
                    int urx,
                    int ury)
Create a rectangle from its coordinates.

Parameters:
llx - Lower left x coordinate.
lly - Lower left y coordinate.
urx - Upper right x coordinate.
ury - Upper right y coordinate.

PDFRectangle

public PDFRectangle(int[] array)
Create a rectangle from an array of four values.

Parameters:
array - values in the order llx, lly, urx, ury
Method Detail

toPDF

public byte[] toPDF()
Produce the PDF representation for the object.

Returns:
the PDF

toPDFString

public String toPDFString()
Returns the description of the rectangle suitable for embedding in the PDF document.

Returns:
The rectangle description, for PDF.


Copyright © 2017. All rights reserved.