X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-rect.cpp;h=aa026abb3eab890ab17824a6b3a06fd275de0661;hb=325ab30ef9de67f89aed7e743d02f09c3a501c42;hp=f59a02853dfcfc0e549ace1c8a06ad09bccf91d6;hpb=1b5ad44f5a431316b6f618a44320e22e5908abcb;p=inkscape.git diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index f59a02853..aa026abb3 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -19,6 +19,7 @@ #include #include #include +#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) {