class HexaPDF:: Rectangle
Parent | HexaPDF::PDFArray |
---|
Implementation of the PDF rectangle data structure.
Rectangles are used for describing page and bounding boxes. They are represented by arrays of four numbers specifying the (x,y) coordinates of any diagonally opposite corners.
This class simplifies the usage of rectangles by automatically normalizing the coordinates so that they are in the order:
[left, bottom, right, top]
where left
is the bottom-left x-coordinate, bottom
is the bottom-left y-coordinate, right
is the top-right x-coordinate and top
is the top-right y-coordinate.
See: PDF2.0 s7.9.5
Public Instance Methods
Returns the y-coordinate of the bottom-left corner.
Sets the y-coordinate of the bottom-left corner to the given value.
Returns the height of the rectangle.
Sets the height of the rectangle to the given value.
Returns the x-coordinate of the bottom-left corner.
Sets the x-coordinate of the bottom-left corner to the given value.
Returns the x-coordinate of the top-right corner.
Sets the x-coordinate of the top-right corner to the given value.
Returns the y-coordinate of the top-right corner.
Sets the y-coordinate of the top-right corner to the given value.
Returns the width of the rectangle.
Sets the width of the rectangle to the given value.