Logo Search packages:      
Sourcecode: inkscape version File versions

NR::Matrix sp_item_i2root_affine ( SPItem const *  item  ) 

Returns the accumulated transformation of the item and all its ancestors, but excluding root's viewport. Used in path operations mostly.

Precondition:
(item != NULL) and SP_IS_ITEM(item).

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

References NR::identity(), NR::Matrix::test_identity(), and SPItem::transform.

{
    g_assert(item != NULL);
    g_assert(SP_IS_ITEM(item));

    NR::Matrix ret(NR::identity());
    g_assert(ret.test_identity());
    while ( NULL != SP_OBJECT_PARENT(item) ) {
        ret *= item->transform;
        item = SP_ITEM(SP_OBJECT_PARENT(item));
    }
    g_assert(SP_IS_ROOT(item));

    ret *= item->transform;

    return ret;
}


Generated by  Doxygen 1.6.0   Back to index