49
ObjectSnapper(SnapManager *sm, Geom::Coord const d);
49
ObjectSnapper(SnapManager *sm, Geom::Coord const d);
52
enum DimensionToSnap {
53
GUIDE_TRANSL_SNAP_X, // For snapping a vertical guide (normal in the X-direction) to objects,
54
GUIDE_TRANSL_SNAP_Y, // For snapping a horizontal guide (normal in the Y-direction) to objects
55
ANGLED_GUIDE_TRANSL_SNAP, // For snapping an angled guide, while translating it accross the desktop
56
TRANSL_SNAP_XY}; // All other cases; for snapping to objects, other than guides
58
void guideFreeSnap(SnappedConstraints &sc,
60
Geom::Point const &guide_normal) const;
62
void guideConstrainedSnap(SnappedConstraints &sc,
64
Geom::Point const &guide_normal,
65
ConstraintLine const &c) const;
67
bool ThisSnapperMightSnap() const;
68
bool GuidesMightSnap() const;
70
Geom::Coord getSnapperTolerance() const; //returns the tolerance of the snapper in screen pixels (i.e. independent of zoom)
71
bool getSnapperAlwaysSnap() const; //if true, then the snapper will always snap, regardless of its tolerance
73
void freeSnap(SnappedConstraints &sc,
74
Inkscape::SnapPreferences::PointType const &t,
76
SnapSourceType const &source_type,
77
bool const &first_point,
78
Geom::OptRect const &bbox_to_snap,
79
std::vector<SPItem const *> const *it,
80
std::vector<std::pair<Geom::Point, int> > *unselected_nodes) const;
82
void constrainedSnap(SnappedConstraints &sc,
83
Inkscape::SnapPreferences::PointType const &t,
85
SnapSourceType const &source_type,
86
bool const &first_point,
87
Geom::OptRect const &bbox_to_snap,
88
ConstraintLine const &c,
89
std::vector<SPItem const *> const *it) const;
52
enum DimensionToSnap {
53
GUIDE_TRANSL_SNAP_X, // For snapping a vertical guide (normal in the X-direction) to objects,
54
GUIDE_TRANSL_SNAP_Y, // For snapping a horizontal guide (normal in the Y-direction) to objects
55
ANGLED_GUIDE_TRANSL_SNAP, // For snapping an angled guide, while translating it accross the desktop
56
TRANSL_SNAP_XY}; // All other cases; for snapping to objects, other than guides
58
void guideFreeSnap(SnappedConstraints &sc,
60
Geom::Point const &guide_normal) const;
62
void guideConstrainedSnap(SnappedConstraints &sc,
64
Geom::Point const &guide_normal,
65
ConstraintLine const &c) const;
67
bool ThisSnapperMightSnap() const;
68
bool GuidesMightSnap() const;
70
Geom::Coord getSnapperTolerance() const; //returns the tolerance of the snapper in screen pixels (i.e. independent of zoom)
71
bool getSnapperAlwaysSnap() const; //if true, then the snapper will always snap, regardless of its tolerance
73
void freeSnap(SnappedConstraints &sc,
74
Inkscape::SnapPreferences::PointType const &t,
76
SnapSourceType const &source_type,
78
Geom::OptRect const &bbox_to_snap,
79
std::vector<SPItem const *> const *it,
80
std::vector<std::pair<Geom::Point, int> > *unselected_nodes) const;
82
void constrainedSnap(SnappedConstraints &sc,
83
Inkscape::SnapPreferences::PointType const &t,
85
SnapSourceType const &source_type,
87
Geom::OptRect const &bbox_to_snap,
88
ConstraintLine const &c,
89
std::vector<SPItem const *> const *it) const;
92
92
//store some lists of candidates, points and paths, so we don't have to rebuild them for each point we want to snap