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

std::vector< NR::Point > Inkscape::Selection::getSnapPoints ( bool  includeItemCenter  )  const

Gets the selection's snap points.

Selection's snap points
Compute the list of points in the selection that are to be considered for snapping.

Definition at line 384 of file selection.cpp.

References SPItem::getCenter(), and itemList().

    GSList const *items = const_cast<Selection *>(this)->itemList();
    std::vector<NR::Point> p;
    for (GSList const *iter = items; iter != NULL; iter = iter->next) {
        SPItem *this_item = SP_ITEM(iter->data);
        sp_item_snappoints(this_item, false, SnapPointsIter(p));
        //Include the transformation origin for snapping
        //For a group only the group's origin is considered
        if (includeItemCenter) {

    return p;

Generated by  Doxygen 1.6.0   Back to index