33 rectangle() : x1(), y1(), x2(), y2() { }
34 rectangle(T _x, T _y, T w, T h) : x1(_x), y1(_y), x2(x1 + w), y2(y1 + h) { }
35 ~rectangle() =
default;
37 bool is_empty()
const {
return (x1 == x2) && (y1 == y2); }
39 T x()
const {
return x1; }
41 T y()
const {
return y1; }
43 T width()
const {
return x2 - x1; }
45 T height()
const {
return y2 - y1; }
47 T left()
const {
return x1; }
48 T top()
const {
return y1; }
49 T right()
const {
return x2; }
50 T bottom()
const {
return y2; }
52 void set_left(T value) { x1 = value; }
53 void set_top(T value) { y1 = value; }
54 void set_right(T value) { x2 = value; }
55 void set_bottom(T value) { y2 = value; }
rectangle< double > rectf
A rectangle with float (double) dimensions and coordinates.
Definition poppler-rectangle.h:62