Logo Search packages:      
Sourcecode: inkscape version File versions

SPItem* sp_document_item_from_list_at_point_bottom ( unsigned int  dkey,
SPGroup *  group,
GSList const *  list,
NR::Point const   p,
bool  take_insensitive 
)

Returns the bottommost item from the list which is at the point, or NULL if none.

Definition at line 915 of file document.cpp.

References SPItem::isVisibleAndUnlocked(), sp_document_item_from_list_at_point_bottom(), and sp_item_get_arenaitem().

Referenced by SPDesktop::item_from_list_at_point_bottom(), and sp_document_item_from_list_at_point_bottom().

{
    g_return_val_if_fail(group, NULL);

    gdouble delta = prefs_get_double_attribute ("options.cursortolerance", "value", 1.0);

    for (SPObject *o = sp_object_first_child(SP_OBJECT(group)) ; o != NULL ; o = SP_OBJECT_NEXT(o) ) {

        if (!SP_IS_ITEM(o)) continue;

        SPItem *item = SP_ITEM(o);
        NRArenaItem *arenaitem = sp_item_get_arenaitem(item, dkey);
        if (arenaitem && nr_arena_item_invoke_pick(arenaitem, p, delta, 1) != NULL
            && (take_insensitive || item->isVisibleAndUnlocked(dkey))) {
            if (g_slist_find((GSList *) list, item) != NULL)
                return item;
        }

        if (SP_IS_GROUP(o)) {
            SPItem *found = sp_document_item_from_list_at_point_bottom(dkey, SP_GROUP(o), list, p, take_insensitive);
            if (found)
                return found;
        }

    }
    return NULL;
}


Generated by  Doxygen 1.6.0   Back to index