com.lowagie.text.pdf
public class PdfRectangle extends PdfArray
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).
Field Summary | |
---|---|
float | llx lower left x |
float | lly lower left y |
float | urx upper right x |
float | ury upper right y |
Constructor Summary | |
---|---|
PdfRectangle(float llx, float lly, float urx, float ury, int rotation)
Constructs a PdfRectangle -object.
| |
PdfRectangle(float llx, float lly, float urx, float ury) | |
PdfRectangle(float urx, float ury, int rotation)
Constructs a PdfRectangle -object starting from the origin (0, 0).
| |
PdfRectangle(float urx, float ury) | |
PdfRectangle(Rectangle rectangle, int rotation)
Constructs a PdfRectangle -object with a Rectangle -object.
| |
PdfRectangle(Rectangle rectangle) |
Method Summary | |
---|---|
boolean | add(PdfObject object)
Overrides the add -method in PdfArray in order to prevent the adding of extra object to the array.
|
float | bottom()
Returns the lower left y-coordinate.
|
float | bottom(int margin)
Returns the lower left y-coordinate, considering a given margin.
|
Rectangle | getRectangle()
Returns the high level version of this PdfRectangle |
float | height()
Returns the height of the rectangle.
|
float | left()
Returns the lower left x-coordinate.
|
float | left(int margin)
Returns the lower left x-coordinate, considering a given margin.
|
float | right()
Returns the upper right x-coordinate.
|
float | right(int margin)
Returns the upper right x-coordinate, considering a given margin.
|
PdfRectangle | rotate()
Swaps the values of urx and ury and of lly and llx in order to rotate the rectangle.
|
float | top()
Returns the upper right y-coordinate.
|
float | top(int margin)
Returns the upper right y-coordinate, considering a given margin.
|
float | width()
Returns the width of the rectangle.
|
PdfRectangle
-object.
Parameters: llx lower left x lly lower left y urx upper right x ury upper right y
Since: rugPdf0.10
PdfRectangle
-object starting from the origin (0, 0).
Parameters: urx upper right x ury upper right y
PdfRectangle
-object with a Rectangle
-object.
Parameters: rectangle a Rectangle
add
-method in PdfArray
in order to prevent the adding of extra object to the array.
Parameters: object PdfObject
to add (will not be added here)
Returns: false
Returns: the lower left y-coordinate
Parameters: margin a margin
Returns: the lower left y-coordinate
Returns: this PdfRectangle translated to class Rectangle
Returns: a height
Returns: the lower left x-coordinate
Parameters: margin a margin
Returns: the lower left x-coordinate
Returns: the upper right x-coordinate
Parameters: margin a margin
Returns: the upper right x-coordinate
Returns: a PdfRectangle
Returns: the upper right y-coordinate
Parameters: margin a margin
Returns: the upper right y-coordinate
Returns: a width