From 679a570061239d307155806b135d71fd6935412c Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sat, 4 Feb 2006 17:16:16 +0000 Subject: [PATCH] query: report true svg bbox, not inkscape's desktop bbox (makes more sense for scripting), remove newline --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f78b1f5ae..e791af153 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -738,7 +738,8 @@ do_query_dimension (SPDocument *doc, bool extent, NR::Dim2 const axis, const gch if (o) { sp_document_ensure_up_to_date (doc); - NR::Rect area = sp_item_bbox_desktop((SPItem *) o); + SPItem *item = ((SPItem *) o); + NR::Rect area = item->invokeBbox(sp_item_i2doc_affine(item)); // "true" SVG bbox for scripting Inkscape::SVGOStringStream os; if (extent) { @@ -746,7 +747,7 @@ do_query_dimension (SPDocument *doc, bool extent, NR::Dim2 const axis, const gch } else { os << area.min()[axis]; } - g_print ("%s\n", os.str().c_str()); + g_print ("%s", os.str().c_str()); } } -- 2.39.5