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

SPItem* sp_document_item_from_list_at_point_bottom ( unsigned int  dkey,
SPGroup group,
GSList const *  list,
Geom::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 1158 of file document.cpp.

References Inkscape::Preferences::get(), 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);
    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
    gdouble delta = prefs->getDouble("/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;

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