diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2015-01-06 12:37:55 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2015-01-06 12:37:55 +0000 |
| commit | 5420b476f4668b03f4ce169494792c78b3a3235d (patch) | |
| tree | eb9e294469079afe8ace1c2809e0b41815d75b49 /src/sp-tspan.cpp | |
| parent | UI/i18n. Fixing inconsistencies in the Fillet/Chamfer LPE dialogs. (diff) | |
| download | inkscape-5420b476f4668b03f4ce169494792c78b3a3235d.tar.gz inkscape-5420b476f4668b03f4ce169494792c78b3a3235d.zip | |
Add getDocumentScale() to return "real-world" to "user-unit" scale factor.
Use it to correct text postion after removing from path.
(bzr r13843)
Diffstat (limited to 'src/sp-tspan.cpp')
| -rw-r--r-- | src/sp-tspan.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp index c3f7689e7..147efff33 100644 --- a/src/sp-tspan.cpp +++ b/src/sp-tspan.cpp @@ -42,6 +42,7 @@ #include "style.h" #include "xml/repr.h" #include "document.h" +#include "2geom/transforms.h" #include "sp-factory.h" @@ -447,7 +448,8 @@ void sp_textpath_to_text(SPObject *tp) } Geom::Point xy = bbox->min(); - + xy *= tp->document->getDocumentScale().inverse(); // Convert to user-units. + // make a list of textpath children GSList *tp_reprs = NULL; @@ -468,7 +470,7 @@ void sp_textpath_to_text(SPObject *tp) tp->deleteObject(); g_slist_free(tp_reprs); - // set x/y on text + // set x/y on text (to be near where it was when on path) /* fixme: Yuck, is this really the right test? */ if (xy[Geom::X] != 1e18 && xy[Geom::Y] != 1e18) { sp_repr_set_svg_double(text->getRepr(), "x", xy[Geom::X]); |
