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

bool sp_tref_reference_allowed ( SPTRef *  tref,
SPObject possible_ref 
)

Returns true when the given tref is allowed to refer to a particular object

Definition at line 437 of file sp-tref.cpp.

{
    bool allowed = false;

    if (tref && possible_ref) {
        if (tref != possible_ref) {
            bool ancestor = false;
            for (SPObject *obj = tref; obj; obj = SP_OBJECT_PARENT(obj)) {
                if (possible_ref == obj) {
                    ancestor = true;
                    break;
                }
            }
            allowed = !ancestor;
        }
    }

    return allowed;
}


Generated by  Doxygen 1.6.0   Back to index