diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index c86c852d7eb14d3316e1b72774dc4595e6f87192..89a86218efb37d0318ce3a0d35505ad8a4ab9ab4 100644 (file)
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
static void sp_tspan_set(SPObject *object, unsigned key, gchar const *value);
static void sp_tspan_update(SPObject *object, SPCtx *ctx, guint flags);
static void sp_tspan_modified(SPObject *object, unsigned flags);
-static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const flags);
+static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);
static Inkscape::XML::Node *sp_tspan_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static char *sp_tspan_description (SPItem *item);
}
}
-static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const /*flags*/)
+static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, Geom::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));
+ for (; parent_text != NULL && !SP_IS_TEXT(parent_text); parent_text = SP_OBJECT_PARENT (parent_text)){};
if (parent_text == NULL) return;
// get the bbox of our portion of the layout
@@ -216,7 +216,7 @@ static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &tr
// Add stroke width
SPStyle* style=SP_OBJECT_STYLE (item);
if (!style->stroke.isNone()) {
- double const scale = expansion(transform);
+ double const scale = transform.descrim();
if ( fabs(style->stroke_width.computed * scale) > 0.01 ) { // sinon c'est 0=oon veut pas de bord
double const width = MAX(0.125, style->stroke_width.computed * scale);
if ( fabs(bbox->x1 - bbox->x0) > -0.00001 && fabs(bbox->y1 - bbox->y0) > -0.00001 ) {
NRRect bbox;
sp_item_invoke_bbox(SP_ITEM(text), &bbox, sp_item_i2doc_affine(SP_ITEM(text)), TRUE);
- NR::Point xy(bbox.x0, bbox.y0);
+ Geom::Point xy(bbox.x0, bbox.y0);
// make a list of textpath children
GSList *tp_reprs = NULL;
// set x/y on text
/* fixme: Yuck, is this really the right test? */
- if (xy[NR::X] != 1e18 && xy[NR::Y] != 1e18) {
- sp_repr_set_svg_double(SP_OBJECT_REPR(text), "x", xy[NR::X]);
- sp_repr_set_svg_double(SP_OBJECT_REPR(text), "y", xy[NR::Y]);
+ if (xy[Geom::X] != 1e18 && xy[Geom::Y] != 1e18) {
+ sp_repr_set_svg_double(SP_OBJECT_REPR(text), "x", xy[Geom::X]);
+ sp_repr_set_svg_double(SP_OBJECT_REPR(text), "y", xy[Geom::Y]);
}
}