diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-03-03 00:12:41 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-03-26 17:48:34 +0000 |
| commit | 95b1c7b549605d7c6ce6623cc4cd121ed7c51a64 (patch) | |
| tree | 1c38b4fe6baabbf45c55e0929516dd825f7d6847 /src/object/sp-mask.cpp | |
| parent | Allow building with USE_PANGO_WIN32. (diff) | |
| download | inkscape-95b1c7b549605d7c6ce6623cc4cd121ed7c51a64.tar.gz inkscape-95b1c7b549605d7c6ce6623cc4cd121ed7c51a64.zip | |
Base LPE refactor
Diffstat (limited to 'src/object/sp-mask.cpp')
| -rw-r--r-- | src/object/sp-mask.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/object/sp-mask.cpp b/src/object/sp-mask.cpp index b65c145fc..2e764131c 100644 --- a/src/object/sp-mask.cpp +++ b/src/object/sp-mask.cpp @@ -115,6 +115,33 @@ void SPMask::set(unsigned int key, const gchar* value) { } } +Geom::OptRect +SPMask::geometricBounds(Geom::Affine const &transform) { + Geom::OptRect bbox; + + for (auto& i: children) { + if (SP_IS_ITEM(&i)) { + Geom::OptRect tmp = SP_ITEM(&i)->geometricBounds(Geom::Affine(SP_ITEM(&i)->transform) * transform); + bbox.unionWith(tmp); + } + } + + return bbox; +} + +Geom::OptRect +SPMask::visualBounds(Geom::Affine const &transform) { + Geom::OptRect bbox; + for (auto& i: children) { + if (SP_IS_ITEM(&i)) { + Geom::OptRect tmp = SP_ITEM(&i)->visualBounds(transform); + bbox.unionWith(tmp); + } + } + + return bbox; +} + void SPMask::child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { /* Invoke SPObjectGroup implementation */ SPObjectGroup::child_added(child, ref); |
