Logo Search packages:      
Sourcecode: inkscape version File versions

bool SPObject::isAncestorOf ( SPObject const *  object  )  const [inherited]

True if object is non-NULL and this is some in/direct parent of object.

Definition at line 371 of file sp-object.cpp.

Referenced by Inkscape::ObjectHierarchy::setBottom(), and Inkscape::ObjectHierarchy::setTop().

                                                   {
    g_return_val_if_fail(object != NULL, false);
    object = SP_OBJECT_PARENT(object);
    while (object) {
        if ( object == this ) {
            return true;
        }
        object = SP_OBJECT_PARENT(object);
    }
    return false;
}


Generated by  Doxygen 1.6.0   Back to index