2
* Copyright (C) 2009-2010, Pino Toscano <pino@kde.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2, or (at your option)
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19
#ifndef POPPLER_RECTANGLE_H
20
#define POPPLER_RECTANGLE_H
22
#include "poppler-global.h"
27
template <typename T> class rectangle
31
: x1(), y1(), x2(), y2()
33
rectangle(T _x, T _y, T w, T h)
34
: x1(_x), y1(_y), x2(x1 + w), y2(y1 + h)
40
{ return (x1 == x2) && (y1 == y2); }
63
void set_left(T value)
67
void set_right(T value)
69
void set_bottom(T value)
76
typedef rectangle<int> rect;
77
typedef rectangle<double> rectf;
79
POPPLER_CPP_EXPORT std::ostream& operator<<(std::ostream& stream, const rect &r);
80
POPPLER_CPP_EXPORT std::ostream& operator<<(std::ostream& stream, const rectf &r);