summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22c86d6)
raw | patch | inline | side by side (parent: 22c86d6)
author | pjrm <pjrm@users.sourceforge.net> | |
Sun, 20 May 2007 07:40:16 +0000 (07:40 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Sun, 20 May 2007 07:40:16 +0000 (07:40 +0000) |
src/libnr/nr-rect.h | patch | blob | history |
diff --git a/src/libnr/nr-rect.h b/src/libnr/nr-rect.h
index 04f446487cccbb3928ded725fc143ecf8cbc2a70..46aff13f4fa938212f39df8654abeaacd1cdcaf5 100644 (file)
--- a/src/libnr/nr-rect.h
+++ b/src/libnr/nr-rect.h
/** 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))