summaryrefslogtreecommitdiffstats
path: root/src/text-chemistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/text-chemistry.cpp')
-rw-r--r--src/text-chemistry.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index b1b31b6f6..873c214a7 100644
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
@@ -19,7 +19,6 @@
#include <string>
#include <glibmm/i18n.h>
-#include "libnr/nr-matrix-fns.h"
#include "xml/repr.h"
#include "sp-rect.h"
#include "sp-textpath.h"
@@ -151,7 +150,7 @@ text_put_on_path()
Inkscape::Text::Layout::Alignment text_alignment = layout->paragraphAlignment(layout->begin());
// remove transform from text, but recursively scale text's fontsize by the expansion
- SP_TEXT(text)->_adjustFontsizeRecursive (text, NR::expansion(SP_ITEM(text)->transform));
+ SP_TEXT(text)->_adjustFontsizeRecursive (text, SP_ITEM(text)->transform.descrim());
text->getRepr()->setAttribute("transform", NULL);
// make a list of text children
@@ -317,7 +316,7 @@ text_flow_into_shape()
if (SP_IS_TEXT(text)) {
// remove transform from text, but recursively scale text's fontsize by the expansion
- SP_TEXT(text)->_adjustFontsizeRecursive(text, NR::expansion(SP_ITEM(text)->transform));
+ SP_TEXT(text)->_adjustFontsizeRecursive(text, SP_ITEM(text)->transform.descrim());
text->getRepr()->setAttribute("transform", NULL);
}
@@ -433,10 +432,10 @@ text_unflow ()
/* Set style */
rtext->setAttribute("style", flowtext->getRepr()->attribute("style")); // fixme: transfer style attrs too; and from descendants
- NRRect bbox;
- SP_ITEM(flowtext)->invoke_bbox( &bbox, SP_ITEM(flowtext)->i2doc_affine(), TRUE);
- Geom::Point xy(bbox.x0, bbox.y0);
- if (xy[Geom::X] != 1e18 && xy[Geom::Y] != 1e18) {
+ Geom::OptRect bbox;
+ SP_ITEM(flowtext)->invoke_bbox(bbox, SP_ITEM(flowtext)->i2doc_affine(), TRUE);
+ if (bbox) {
+ Geom::Point xy = bbox->min();
sp_repr_set_svg_double(rtext, "x", xy[Geom::X]);
sp_repr_set_svg_double(rtext, "y", xy[Geom::Y]);
}