summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f50a90)
raw | patch | inline | side by side (parent: 0f50a90)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 5 Feb 2006 21:32:06 +0000 (21:32 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 5 Feb 2006 21:32:06 +0000 (21:32 +0000) |
src/sp-tspan.cpp | patch | blob | history |
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index 6be42312516e2ec64c5fa4bb696040775091df7b..f07783dbefe7db75ce65c4ac636f4d57d616c39d 100644 (file)
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const flags)
{
+ // find out the ancestor text which holds our layout
SPObject *parent_text = SP_OBJECT(item);
for (; parent_text != NULL && !SP_IS_TEXT(parent_text); parent_text = SP_OBJECT_PARENT (parent_text));
if (parent_text == NULL) return;
- Inkscape::Text::Layout layout = SP_TEXT(parent_text)->layout;
-
- SP_TEXT(parent_text)->layout.getBoundingBox(bbox, transform, sp_text_get_length_upto(parent_text, item) - 1, sp_text_get_length(item));
+ // get the bbox of our portion of the layout
+ SP_TEXT(parent_text)->layout.getBoundingBox(bbox, transform, sp_text_get_length_upto(parent_text, item), sp_text_get_length_upto(item, NULL) - 1);
// Add stroke width
SPStyle* style=SP_OBJECT_STYLE (item);