Package org.apache.fop.pdf
Class PDFRectangle
java.lang.Object
org.apache.fop.pdf.PDFRectangle
- All Implemented Interfaces:
PDFWritable
class representing a rectangle
Rectangles are specified on page 183 of the PDF 1.3 spec.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPDFRectangle
(int[] array) create a rectangle giving an array of four valuesPDFRectangle
(int llx, int lly, int urx, int ury) create a rectangle giving the four separate values -
Method Summary
Modifier and TypeMethodDescriptionvoid
outputInline
(OutputStream out, StringBuilder textBuffer) Writes a "direct object" (inline object) representation to the stream.toString()
-
Field Details
-
llx
protected int llxlower left x coordinate -
lly
protected int llylower left y coordinate -
urx
protected int urxupper right x coordinate -
ury
protected int uryupper right y coordinate
-
-
Constructor Details
-
PDFRectangle
public PDFRectangle(int llx, int lly, int urx, int ury) create a rectangle giving the four separate values- Parameters:
llx
- lower left x coordinatelly
- lower left y coordinateurx
- upper right x coordinateury
- upper right y coordinate
-
PDFRectangle
public PDFRectangle(int[] array) create a rectangle giving an array of four values- Parameters:
array
- values in the order llx, lly, urx, ury
-
-
Method Details
-
toString
-
outputInline
Writes a "direct object" (inline object) representation to the stream. A text buffer is given for optimized encoding of text content.IMPORTANT: If you need to write out binary output, call
PDFDocument.flushTextBuffer(StringBuilder, OutputStream)
before writing any content to theOutputStream
!- Specified by:
outputInline
in interfacePDFWritable
- Parameters:
out
- the OutputStream (for binary content)textBuffer
- the text buffer for text content- Throws:
IOException
- if an I/O error occurs
-