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