67
67
bool gridSnapperMightSnap() const;
69
69
void setup(SPDesktop const *desktop,
70
bool snapindicator = true,
71
SPItem const *item_to_ignore = NULL,
72
std::vector<std::pair<Geom::Point, int> > *unselected_nodes = NULL,
73
SPGuide *guide_to_ignore = NULL);
70
bool snapindicator = true,
71
SPItem const *item_to_ignore = NULL,
72
std::vector<std::pair<Geom::Point, int> > *unselected_nodes = NULL,
73
SPGuide *guide_to_ignore = NULL);
75
75
void setup(SPDesktop const *desktop,
77
std::vector<SPItem const *> &items_to_ignore,
78
std::vector<std::pair<Geom::Point, int> > *unselected_nodes = NULL,
79
SPGuide *guide_to_ignore = NULL);
77
std::vector<SPItem const *> &items_to_ignore,
78
std::vector<std::pair<Geom::Point, int> > *unselected_nodes = NULL,
79
SPGuide *guide_to_ignore = NULL);
81
81
// freeSnapReturnByRef() is preferred over freeSnap(), because it only returns a
82
82
// point if snapping has occurred (by overwriting p); otherwise p is untouched
83
83
void freeSnapReturnByRef(Inkscape::SnapPreferences::PointType point_type,
85
Inkscape::SnapSourceType const source_type,
86
bool first_point = true,
87
Geom::OptRect const &bbox_to_snap = Geom::OptRect()) const;
85
Inkscape::SnapSourceType const source_type,
87
Geom::OptRect const &bbox_to_snap = Geom::OptRect()) const;
90
90
Inkscape::SnappedPoint freeSnap(Inkscape::SnapPreferences::PointType point_type,
92
Inkscape::SnapSourceType const &source_type,
93
bool first_point = true,
92
Inkscape::SnapSourceType const &source_type,
94
94
Geom::OptRect const &bbox_to_snap = Geom::OptRect() ) const;
96
96
Geom::Point multipleOfGridPitch(Geom::Point const &t) const;
98
98
// constrainedSnapReturnByRef() is preferred over constrainedSnap(), because it only returns a
99
99
// point, by overwriting p, if snapping has occurred; otherwise p is untouched
100
100
void constrainedSnapReturnByRef(Inkscape::SnapPreferences::PointType point_type,
102
Inkscape::SnapSourceType const source_type,
103
Inkscape::Snapper::ConstraintLine const &constraint,
104
bool first_point = true,
105
Geom::OptRect const &bbox_to_snap = Geom::OptRect()) const;
102
Inkscape::SnapSourceType const source_type,
103
Inkscape::Snapper::ConstraintLine const &constraint,
105
Geom::OptRect const &bbox_to_snap = Geom::OptRect()) const;
107
107
Inkscape::SnappedPoint constrainedSnap(Inkscape::SnapPreferences::PointType point_type,
108
Geom::Point const &p,
109
Inkscape::SnapSourceType const &source_type,
110
Inkscape::Snapper::ConstraintLine const &constraint,
111
bool first_point = true,
108
Geom::Point const &p,
109
Inkscape::SnapSourceType const &source_type,
110
Inkscape::Snapper::ConstraintLine const &constraint,
112
112
Geom::OptRect const &bbox_to_snap = Geom::OptRect()) const;
114
114
void guideFreeSnap(Geom::Point &p, Geom::Point const &guide_normal, SPGuideDragType drag_type) const;