Class PdfRectangle
java.lang.Object
com.aowagie.text.pdf.PdfObject
com.aowagie.text.pdf.PdfArray
com.aowagie.text.pdf.PdfRectangle
PdfRectangle is the PDF Rectangle object.
Rectangles are used to describe locations on the page and bounding boxes for several
objects in PDF, such as fonts. A rectangle is represented as an array of
four numbers, specifying the lower left x, lower left y, upper right x,
and upper right y coordinates of the rectangle, in that order.
This object is described in the 'Portable Document Format Reference Manual version 1.3'
section 7.1 (page 183).
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(float[] values) Block changes to the underlying PdfArraybooleanadd(int[] values) Block changes to the underlying PdfArraybooleanOverrides theadd-method inPdfArrayin order to prevent the adding of extra object to the array.voidBlock changes to the underlying PdfArrayfloatbottom()Returns the lower left y-coordinate.Returns the high level version of this PdfRectanglefloatleft()Returns the lower left x-coordinate.floatright()Returns the upper right x-coordinate.floattop()Returns the upper right y-coordinate.Methods inherited from class PdfArray
getArrayList, getAsName, getAsNumber, getPdfObject, isEmpty, listIterator, size, toPdf, toStringMethods inherited from class PdfObject
getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, setContent, setIndRef, type
-
Constructor Details
-
PdfRectangle
public PdfRectangle(float llx, float lly, float urx, float ury)
-
-
Method Details
-
getRectangle
Returns the high level version of this PdfRectangle- Returns:
- this PdfRectangle translated to class Rectangle
-
add
-
add
-
add
-
addFirst
-
left
public float left()Returns the lower left x-coordinate.- Returns:
- the lower left x-coordinate
-
right
public float right()Returns the upper right x-coordinate.- Returns:
- the upper right x-coordinate
-
top
public float top()Returns the upper right y-coordinate.- Returns:
- the upper right y-coordinate
-
bottom
public float bottom()Returns the lower left y-coordinate.- Returns:
- the lower left y-coordinate
-