diff options
| author | Ted Gould <ted@gould.cx> | 2008-11-21 05:24:08 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-11-21 05:24:08 +0000 |
| commit | 44a3a78fb6a3863c0c7f3c1193837337e68a67e4 (patch) | |
| tree | 1722ee5ec6f88c881cd4124923354b3c1311501b /src/document.cpp | |
| parent | Merge from trunk (diff) | |
| download | inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.tar.gz inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.zip | |
Merge from fe-moved
(bzr r6891)
Diffstat (limited to 'src/document.cpp')
| -rw-r--r-- | src/document.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/document.cpp b/src/document.cpp index 28a2be9a1..d38d5423f 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -560,6 +560,11 @@ gdouble sp_document_height(SPDocument *document) return root->height.computed; } +Geom::Point sp_document_dimensions(SPDocument *doc) +{ + return Geom::Point(sp_document_width(doc), sp_document_height(doc)); +} + /** * Given a Geom::Rect that may, for example, correspond to the bbox of an object, * this function fits the canvas to that rect by resizing the canvas @@ -567,8 +572,6 @@ gdouble sp_document_height(SPDocument *document) */ void SPDocument::fitToRect(Geom::Rect const &rect) { - g_return_if_fail(!rect.isEmpty()); - double const w = rect.width(); double const h = rect.height(); @@ -918,7 +921,7 @@ static GSList *find_items_in_area(GSList *s, SPGroup *group, unsigned int dkey, s = find_items_in_area(s, SP_GROUP(o), dkey, area, test); } else { SPItem *child = SP_ITEM(o); - boost::optional<Geom::Rect> box = sp_item_bbox_desktop(child); + Geom::OptRect box = sp_item_bbox_desktop(child); if ( box && test(area, *box) && (take_insensitive || child->isVisibleAndUnlocked(dkey))) { s = g_slist_append(s, child); } |
