Logo Search packages:      
Sourcecode: inkscape version File versions

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

Precondition:
ancestor really is an ancestor (>=) of object, or NULL. ("Ancestor (\>=)" here includes as far as object itself.)

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

References NR::identity().

Referenced by sp_item_i2doc_affine().

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

    /* stop at first non-renderable ancestor */
    while ( object != ancestor && SP_IS_ITEM(object) ) {
        if (SP_IS_ROOT(object)) {
            ret *= SP_ROOT(object)->c2p;
        }
        ret *= SP_ITEM(object)->transform;
        object = SP_OBJECT_PARENT(object);
    }
    return ret;
}


Generated by  Doxygen 1.6.0   Back to index