_rsvg_node_text_type_tspan (RsvgNodeText * self, RsvgDrawingCtx * ctx,
                            gdouble * x, gdouble * y, gboolean * lastwasspace)
{
    rsvg_state_reinherit_top (ctx, self->super.state, 0);

    if (self->x.factor != 'n') {
        *x = _rsvg_css_normalize_length (&self->x, ctx, 'h');
        if (rsvg_current_state (ctx)->text_anchor != TEXT_ANCHOR_START) {
            double length = 0;
            gboolean lws = *lastwasspace;
            _rsvg_node_text_length_children (&self->super, ctx, &length, &lws);
            if (rsvg_current_state (ctx)->text_anchor == TEXT_ANCHOR_END)
                *x -= length;
            if (rsvg_current_state (ctx)->text_anchor == TEXT_ANCHOR_MIDDLE)
                *x -= length / 2;
        }
    }
    if (self->y.factor != 'n')
        *y = _rsvg_css_normalize_length (&self->y, ctx, 'v');
    *x += _rsvg_css_normalize_length (&self->dx, ctx, 'h');
    *y += _rsvg_css_normalize_length (&self->dy, ctx, 'v');
    _rsvg_node_text_type_children (&self->super, ctx, x, y, lastwasspace);
}
_rsvg_node_text_type_tspan (RsvgNodeText * self, RsvgDrawingCtx * ctx,
                            gdouble * x, gdouble * y, gboolean * lastwasspace)
{
    rsvg_state_reinherit_top (ctx, self->super.state, 0);

    if (self->x.factor != 'n') {
        *x = _rsvg_css_normalize_length (&self->x, ctx, 'h');
        if (rsvg_current_state (ctx)->text_anchor != TEXT_ANCHOR_START) {
            double length = 0;
            gboolean lws = *lastwasspace;
            _rsvg_node_text_length_children (&self->super, ctx, &length, &lws);
            if (rsvg_current_state (ctx)->text_anchor == TEXT_ANCHOR_END)
                *x -= length;
            if (rsvg_current_state (ctx)->text_anchor == TEXT_ANCHOR_MIDDLE)
                *x -= length / 2;
        }
    }
    if (self->y.factor != 'n')
        *y = _rsvg_css_normalize_length (&self->y, ctx, 'v');
    *x += _rsvg_css_normalize_length (&self->dx, ctx, 'h');
    *y += _rsvg_css_normalize_length (&self->dy, ctx, 'v');
    _rsvg_node_text_type_children (&self->super, ctx, x, y, lastwasspace);
}