From 6162cf1a9f6953319e0e3d6b56354c5cb0f26352 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 3 Nov 2016 00:08:41 +0100 Subject: Add some unit tests for object-set cppification (bzr r15203) --- src/sp-item.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index f52784489..36a9c3c9d 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -868,6 +868,17 @@ Geom::OptRect SPItem::bounds(BBoxType type, Geom::Affine const &transform) const } } +Geom::OptRect SPItem::documentPreferredBounds() const +{ + if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) { + return documentBounds(SPItem::VISUAL_BBOX); + } else { + return documentBounds(SPItem::GEOMETRIC_BBOX); + } +} + + + Geom::OptRect SPItem::documentGeometricBounds() const { return geometricBounds(i2doc_affine()); -- cgit v1.2.3