Code

No more NRMatrix or NRPoint.
[inkscape.git] / src / libnr / nr-rect.h
index 439538e2998f880d99c1b8c4efc9c92fa310c244..c61083b4b975eb1b98242534211995ee16aa60b1 100644 (file)
@@ -24,9 +24,9 @@
 #include <libnr/nr-point.h>
 #include <libnr/nr-maybe.h>
 #include <libnr/nr-point-matrix-ops.h>
+#include <libnr/nr-forward.h>
 
 namespace NR {
-    struct Matrix;
 
 /** A rectangle is always aligned to the X and Y axis.  This means it
  * can be defined using only 4 coordinates, and determining
@@ -247,14 +247,14 @@ inline std::ostream
 
 /* legacy rect stuff */
 
-struct NRMatrix;
-
 /* NULL rect is infinite */
 
 struct NRRect {
-    NRRect() {}
+    NRRect()
+    : x0(0), y0(0), x1(0), y1(0)
+    {}
     NRRect(NR::Coord xmin, NR::Coord ymin, NR::Coord xmax, NR::Coord ymax)
-    : x0(xmin), y0(ymin), x1(xmin), y1(ymin)
+    : x0(xmin), y0(ymin), x1(xmax), y1(ymax)
     {}
     explicit NRRect(NR::Rect const &rect);
     explicit NRRect(NR::Maybe<NR::Rect> const &rect);
@@ -300,7 +300,7 @@ NRRect *nr_rect_d_union_xy(NRRect *d, NR::Coord x, NR::Coord y);
 NRRectL *nr_rect_l_union_xy(NRRectL *d, NR::ICoord x, NR::ICoord y);
 
 NRRect *nr_rect_d_matrix_transform(NRRect *d, NRRect const *s, NR::Matrix const &m);
-NRRect *nr_rect_d_matrix_transform(NRRect *d, NRRect const *s, NRMatrix const *m);
+NRRect *nr_rect_d_matrix_transform(NRRect *d, NRRect const *s, NR::Matrix const *m);
 NRRectL *nr_rect_l_enlarge(NRRectL *d, int amount);