Code

Finish translate of live path effects and filters
[inkscape.git] / src / sp-rect.cpp
index f59a02853dfcfc0e549ace1c8a06ad09bccf91d6..aa026abb3eab890ab17824a6b3a06fd275de0661 100644 (file)
@@ -19,6 +19,7 @@
 #include <display/curve.h>
 #include <libnr/nr-matrix-ops.h>
 #include <libnr/nr-matrix-fns.h>
+#include <2geom/rect.h>
 
 #include "inkscape.h"
 #include "document.h"
@@ -458,6 +459,14 @@ sp_rect_get_visible_ry(SPRect *rect)
         SP_ITEM(rect)->transform);
 }
 
+Geom::Rect
+sp_rect_get_rect (SPRect *rect)
+{
+    Geom::Point p0 = Geom::Point(rect->x.computed, rect->y.computed);
+    Geom::Point p2 = Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed + rect->height.computed);
+    return Geom::Rect(p0, p2);
+}
+
 void
 sp_rect_compensate_rxry(SPRect *rect, Geom::Matrix xform)
 {