PoDoFo 0.9.20
|
#include <Rect.h>
Public Member Functions | |
Rect () | |
Rect (double x, double y, double width, double height) | |
Rect (const Rect &rhs)=default | |
void | ToArray (PdfArray &arr) const |
std::string | ToString () const |
void | Intersect (const Rect &rect) |
double | GetLeft () const |
double | GetBottom () const |
double | GetRight () const |
double | GetTop () const |
Static Public Member Functions | |
static Rect | FromCorners (double x1, double y1, double x2, double y2) |
static Rect | FromArray (const PdfArray &arr) |
A rectangle defined by position and size
Rect::Rect | ( | ) |
Create an empty rectangle with bottom=left=with=height=0
Rect::Rect | ( | double | x, |
double | y, | ||
double | width, | ||
double | height ) |
Create a rectangle with a given size and position
|
default |
Copy constructor
Create a Rect from a the 4 values in the array
arr | the array to load the values from |
|
static |
|
inline |
Get the bottom coordinate of the rectangle
|
inline |
Get the left coordinate of the rectangle
double Rect::GetRight | ( | ) | const |
Get the right coordinate of the rectangle
double Rect::GetTop | ( | ) | const |
Get the top coordinate of the rectangle
void Rect::Intersect | ( | const Rect & | rect | ) |
Intersect with another rect
rect | the rect to intersect with |
void Rect::ToArray | ( | PdfArray & | arr | ) | const |
Converts the rectangle into an array
var | the array to store the Rect |
string Rect::ToString | ( | ) | const |
Returns a string representation of the Rect