X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flibnr%2Fnr-rect.h;h=46aff13f4fa938212f39df8654abeaacd1cdcaf5;hb=1c2557cd7259a8166f07b7982a44e040a44d4db1;hp=1062df955b132d9142a60f6f14eecb18ab5595e9;hpb=3e54f202d25d5b42a058f4b6e39f3958979b6766;p=inkscape.git diff --git a/src/libnr/nr-rect.h b/src/libnr/nr-rect.h index 1062df955..46aff13f4 100644 --- a/src/libnr/nr-rect.h +++ b/src/libnr/nr-rect.h @@ -53,6 +53,7 @@ public: /** 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(epsilon) || isEmpty(epsilon); } @@ -125,6 +126,8 @@ public: _max[NR::Y] += by; } + void growBy (gdouble by); + /** Scales the rect by s, with origin at 0, 0 */ inline Rect operator*(double const s) const { return Rect(s * min(), s * max()); @@ -262,6 +265,7 @@ struct NRRect { #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))