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

Inkscape::SnappedPoint SnapManager::constrainedSnapTranslation ( std::vector< Inkscape::SnapCandidatePoint > const &  p,
Geom::Point const &  pointer,
Inkscape::Snapper::ConstraintLine const &  constraint,
Geom::Point const &  tr 
) const

Apply a translation to a set of points and try to snap along a constraint.

point_typeCategory of points to which the source point belongs: node or bounding box.
pCollection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
pointerLocation of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
constraintThe direction or line along which snapping must occur.
trProposed translation; the final translation can only be calculated after snapping has occurred.
An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.

Definition at line 763 of file snap.cpp.

References _displaySnapsource(), _snapTransformed(), and _transformPoint().

Referenced by Inkscape::SelTrans::moveTo().

    if (p.size() == 1) {
        Geom::Point pt = _transformPoint(p.at(0), TRANSLATION, tr, Geom::Point(0,0), Geom::X, false);
        _displaySnapsource(Inkscape::SnapCandidatePoint(pt, p.at(0).getSourceType()));

    return _snapTransformed(p, pointer, true, constraint, TRANSLATION, tr, Geom::Point(0,0), Geom::X, false);

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