|
PoDoFo 1.1.0
|
An normalized rectangle defined by position (left-bottom) and size. More...
#include <Rect.h>
Public Member Functions | |
| Rect () | |
| Create an empty rectangle with bottom=left=with=height=0. | |
| Rect (double x, double y, double width, double height) | |
| Create a rectangle with a given position and size. | |
| Rect (const Rect &rhs)=default | |
| Copy constructor. | |
| void | ToArray (PdfArray &arr) const |
| Converts the rectangle into an array. | |
| PdfArray | ToArray () const |
| std::string | ToString () const |
| Returns a string representation of the Rect. | |
| bool | Contains (double x, double y) const |
| void | Intersect (const Rect &rect) |
| Intersect with another rect. | |
| bool | IsValid () const |
| Corners | ToCorners () const |
| Vector2 | GetLeftBottom () const |
| Get the oriented left-bottom point. | |
| Vector2 | GetRightTop () const |
| Get the oriented left-bottom point. | |
| double | GetLeft () const |
| Get the left coordinate of the rectangle. | |
| double | GetBottom () const |
| Get the bottom coordinate of the rectangle. | |
| double | GetRight () const |
| Get the right coordinate of the rectangle. | |
| double | GetTop () const |
| Get the top coordinate of the rectangle. | |
| bool | operator== (const Rect &rect) const |
| bool | operator!= (const Rect &rect) const |
| Rect | operator* (const Matrix &m) const |
| Rect & | operator= (const Rect &rhs)=default |
| operator Corners () const | |
Static Public Member Functions | |
| static Rect | FromCorners (double x1, double y1, double x2, double y2) |
| Create a Rect from a couple of arbitrary points. | |
| static Rect | FromCorners (const Vector2 &corner1, const Vector2 &corner2) |
| static Rect | FromCorners (const Corners &corners) |
| static Rect | FromArray (const PdfArray &arr) |
| Create a Rect from a the 4 values in the array. | |
Public Attributes | |
| double | X |
| double | Y |
| double | Width |
| double | Height |
An normalized rectangle defined by position (left-bottom) and size.
Create a Rect from a the 4 values in the array.
| arr | the array to load the values from |
Intersect with another rect.
| rect | the rect to intersect with |
Converts the rectangle into an array.
| var | the array to store the Rect |
| string Rect::ToString | ( | ) | const |
Returns a string representation of the Rect.