summaryrefslogtreecommitdiffstats
path: root/src/sp-tspan.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:07:14 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:07:14 +0000
commite77956b4dbd029c9f6949f81fe083606f995c624 (patch)
tree74adda4df8986d65f70efb341c6235277361fd35 /src/sp-tspan.cpp
parentupdated code to work on 0.92 code (diff)
parentLatvian translation update (diff)
downloadinkscape-e77956b4dbd029c9f6949f81fe083606f995c624.tar.gz
inkscape-e77956b4dbd029c9f6949f81fe083606f995c624.zip
update to trunk
(bzr r12588.1.39)
Diffstat (limited to 'src/sp-tspan.cpp')
-rw-r--r--src/sp-tspan.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index c3f7689e7..7582cb9e6 100644
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
@@ -42,21 +42,7 @@
#include "style.h"
#include "xml/repr.h"
#include "document.h"
-
-#include "sp-factory.h"
-
-namespace {
- SPObject* createTSpan() {
- return new SPTSpan();
- }
-
- SPObject* createTextPath() {
- return new SPTextPath();
- }
-
- bool tspanRegistered = SPFactory::instance().registerObject("svg:tspan", createTSpan);
- bool textPathRegistered = SPFactory::instance().registerObject("svg:textPath", createTextPath);
-}
+#include "2geom/transforms.h"
/*#####################################################
# SPTSPAN
@@ -447,7 +433,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 +455,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]);