Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Geom::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 1522 of file sp-item.cpp.

References Geom::identity().

Referenced by sp_item_i2doc_affine().

                                                                     {
    Geom::Matrix ret(Geom::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;
        } else {
            ret *= SP_ITEM(object)->transform;
        }
        object = object->parent;
    }
    return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index