diff --git a/src/libnr/nr-rect.h b/src/libnr/nr-rect.h
index 2439df95d3361dde016a240eb35f3e518fd0386e..46aff13f4fa938212f39df8654abeaacd1cdcaf5 100644 (file)
--- a/src/libnr/nr-rect.h
+++ b/src/libnr/nr-rect.h
#include <libnr/nr-maybe.h>
#include <libnr/nr-point-matrix-ops.h>
-struct NRRect;
-struct NRRectL;
-
namespace NR {
struct Matrix;
public:
Rect() : _min(-_inf(), -_inf()), _max(_inf(), _inf()) {}
Rect(Point const &p0, Point const &p1);
- Rect(NRRect *r);
- Rect(NRRectL *r);
Point const &min() const { return _min; }
Point const &max() const { return _max; }
/** returns the midpoint of this rect. */
Point midpoint() const;
+ /** True iff either width or height is less than \a epsilon. */
bool isEmpty(double epsilon=1e-6) const {
return isEmpty<X>(epsilon) || isEmpty<Y>(epsilon);
}
#define nr_rect_d_set_empty(r) (*(r) = NR_RECT_EMPTY)
#define nr_rect_l_set_empty(r) (*(r) = NR_RECT_L_EMPTY)
+/** "Empty" here includes the case of zero width or zero height. */
#define nr_rect_d_test_empty(r) ((r) && NR_RECT_DFLS_TEST_EMPTY(r))
#define nr_rect_l_test_empty(r) ((r) && NR_RECT_DFLS_TEST_EMPTY(r))