diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2009-03-03 21:51:55 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2009-03-03 21:51:55 +0000 |
| commit | 6d4dc88ce489961bd3c4f810bf355901ffddeeed (patch) | |
| tree | 2f0efc6e9113471edb80214c3c45b29f66f378d5 /src/sp-rect.cpp | |
| parent | improve helperpath generation on mouse-over (diff) | |
| download | inkscape-6d4dc88ce489961bd3c4f810bf355901ffddeeed.tar.gz inkscape-6d4dc88ce489961bd3c4f810bf355901ffddeeed.zip | |
add mouse-over helperpath for rects
(bzr r7407)
Diffstat (limited to 'src/sp-rect.cpp')
| -rw-r--r-- | src/sp-rect.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 <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) { |
