Logo Search packages:      
Sourcecode: inkscape version File versions

SPItem* sp_event_context_find_item ( SPDesktop desktop,
Geom::Point const &  p,
bool  select_under,
bool  into_groups 
)

Returns item at point p in desktop.

If state includes alt key mask, cyclically selects under; honors into_groups.

Definition at line 1091 of file event-context.cpp.

{
    SPItem *item;

    if (select_under) {
        SPItem *selected_at_point =
            desktop->item_from_list_at_point_bottom (desktop->selection->itemList(), p);
        item = desktop->item_at_point(p, into_groups, selected_at_point);
        if (item == NULL) { // we may have reached bottom, flip over to the top
            item = desktop->item_at_point(p, into_groups, NULL);
        }
    } else
        item = desktop->item_at_point(p, into_groups, NULL);

    return item;
}


Generated by  Doxygen 1.6.0   Back to index