Comment 2 for bug 1207502

Revision history for this message
Liam P. White (liampwhite) wrote :

(Almost complete) fix committed in r13688
<https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13688>

@johan, can you determine whether it is possible to finish this? Jasper seems to have hinted that it was possible…

    /* } else if (transform.withoutTranslation().isRotation()) {
        // FIXME someone please figure out if this can actually be done
        // The rotation angle is correct, the points are not
        // Refer to the matrix in svg-affine-test.h

        // We are a rotation about a special axis
        strcpy(c + p, "rotate(");
        p += 7;

        Geom::Affine const sans_translate = transform.withoutTranslation();
        double angle = std::atan2(sans_translate[1], sans_translate[0]) * (180 / M_PI);
        p += sp_svg_number_write_de(c + p, sizeof(c) - p, angle, prec, min_exp);
        c[p++] = ',';

        Geom::Point pt = transform.translation();
        p += sp_svg_number_write_de(c + p, sizeof(c) - p, pt[Geom::X], prec, min_exp);

        c[p++] = ',';

        p += sp_svg_number_write_de(c + p, sizeof(c) - p, pt[Geom::Y], prec, min_exp);

        c[p++] = ')';
        c[p] = '\000';*/