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

Inkscape::SnappedPoint SnapManager::constrainedSnapStretch ( std::vector< Inkscape::SnapCandidatePoint > const &  p,
Geom::Point const &  pointer,
Geom::Coord const &  s,
Geom::Point const &  o,
Geom::Dim2  d,
bool  u 
) const

Apply a stretch to a set of points and snap such that the direction of the stretch is preserved.

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).
sProposed stretch; the final stretch can only be calculated after snapping has occurred
oOrigin of the stretching
dDimension in which to apply proposed stretch.
utrue if the stretch should be uniform (i.e. to be applied equally in both dimensions)
An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.

Definition at line 840 of file snap.cpp.

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

    if (p.size() == 1) {
        Geom::Point pt = _transformPoint(p.at(0), STRETCH, Geom::Point(s, s), o, d, u);
        _displaySnapsource(Inkscape::SnapCandidatePoint(pt, p.at(0).getSourceType()));

    return _snapTransformed(p, pointer, true, Geom::Point(0,0), STRETCH, Geom::Point(s, s), o, d, u);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index