Logo Search packages:      
Sourcecode: inkscape version File versions

NR::Matrix i2anc_affine ( SPObject const *  object,
SPObject const *const   ancestor 

ancestor really is an ancestor (>=) of object. ("Ancestor (\>=)" here includes as far as object itself.)

in_same_coordsys_as_anc(object, ancestor).

Definition at line 954 of file sp-item.cpp.

References NR::identity().

    NR::Matrix ret(NR::identity());
    g_return_val_if_fail(object != NULL && ancestor != NULL, ret);

    while ( object != ancestor ) {
        g_return_val_if_fail(SP_IS_ITEM(object), ret);
        /* g_error is correct if object is <defs> or a non-SVG element type.
         * I wonder if there are cases (perhaps involving a nested <svg> inside a foreignObject)
         * where some different behaviour is appropriate.  We'll wait for a bug report and example
         * document to decide what to do.

        ret *= SP_ITEM(object)->transform;
        object = SP_OBJECT_PARENT(object);
    return ret;

Generated by  Doxygen 1.6.0   Back to index