120 bool snapindicator =
true,
121 SPObject const *item_to_ignore =
nullptr,
122 std::vector<Inkscape::SnapCandidatePoint> *unselected_nodes =
nullptr);
140 std::vector<SPObject const *> &objects_to_ignore,
141 std::vector<Inkscape::SnapCandidatePoint> *unselected_nodes =
nullptr);
144 bool snapindicator =
true,
145 std::vector<Inkscape::SnapCandidatePoint> *unselected_nodes =
nullptr);
209 bool to_path_only =
false)
const;
292 std::vector<Inkscape::Snapper::SnapConstraint>
const &constraints,
293 bool dont_snap =
false,
309 std::optional<Geom::Point>
const &p_ref,
311 unsigned const snaps)
const;
417 void snapTransformed(std::vector<Inkscape::SnapCandidatePoint>
const &points,
439 std::vector<SPObject const *>
const *it,
441 bool const _clip_or_mask,
Authors: Parth Pant parthpant4@gmail.com
3x3 matrix representing an affine transformation.
Axis-aligned rectangle that can be empty.
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
Snapping things to on-canvas alignment guides.
Snapping equidistant objects.
Snapping things to objects.
Class to store data for points which are snap candidates, either as a source or as a target.
Storing of snapping preferences.
Class describing the result of an attempt to snap.
To do: update description of desktop.
Typed SVG document implementation.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Class to coordinate snapping operations.
SPDesktop const * _desktop
SnapperList getGridSnappers() const
Return a list of gridsnappers.
void guideConstrainedSnap(Geom::Point &p, SPGuide const &guideline) const
Wrapper method to make snapping of the guide origin a bit easier (i.e.
bool _findCandidates_already_called
void displaySnapsource(Inkscape::SnapCandidatePoint const &p) const
Mark the location of the snap source (not the snap target!) on the canvas by drawing a symbol.
std::vector< SPItem * > _rotation_center_source_items
bool getSnapIndicator() const
std::unique_ptr< std::vector< Inkscape::SnapCandidateItem > > _obj_snapper_candidates
void constrainedSnapReturnByRef(Geom::Point &p, Inkscape::SnapSourceType const source_type, Inkscape::Snapper::SnapConstraint const &constraint, Geom::OptRect const &bbox_to_snap=Geom::OptRect()) const
Try to snap a point along a constraint line to grids, guides or objects.
void setup(SPDesktop const *desktop, bool snapindicator=true, SPObject const *item_to_ignore=nullptr, std::vector< Inkscape::SnapCandidatePoint > *unselected_nodes=nullptr)
Convenience shortcut when there is only one item to ignore.
void _findCandidates(SPObject *parent, std::vector< SPObject const * > const *it, Geom::Rect const &bbox_to_snap, bool const _clip_or_mask, Geom::Affine const additional_affine)
Find all items within snapping range.
std::unique_ptr< std::vector< Inkscape::SnapCandidateItem > > _align_snapper_candidates
Inkscape::AlignmentSnapper alignment
snapper to align with other objects
void guideFreeSnap(Geom::Point &p, Geom::Point &origin_or_vector, bool origin, bool freeze_angle) const
Wrapper method to make snapping of the guide origin a bit easier (i.e.
Geom::Point multipleOfGridPitch(Geom::Point const &t, Geom::Point const &origin)
Snap to the closest multiple of a grid pitch.
SPGuide const * getGuideToIgnore() const
std::vector< SPObject const * > _objects_to_ignore
Items that should not be snapped to, for example the items that are currently being dragged....
void setupIgnoreSelection(SPDesktop const *desktop, bool snapindicator=true, std::vector< Inkscape::SnapCandidatePoint > *unselected_nodes=nullptr)
Setup, taking the list of items to ignore from the desktop's selection.
Inkscape::ObjectSnapper object
snapper to other objects
Inkscape::SnappedPoint findBestSnap(Inkscape::SnapCandidatePoint const &p, IntermSnapResults const &isr, bool constrained, bool allowOffScreen=false, bool to_paths_only=false) const
Given a set of possible snap targets, find the best target (which is not necessarily also the nearest...
bool gridSnapperMightSnap() const
void freeSnapReturnByRef(Geom::Point &p, Inkscape::SnapSourceType const source_type, Geom::OptRect const &bbox_to_snap=Geom::OptRect()) const
Try to snap a point to grids, guides or objects.
std::list< const Inkscape::Snapper * > SnapperList
const std::vector< SPItem * > & getRotationCenterSource()
void preSnap(Inkscape::SnapCandidatePoint const &p, bool to_path_only=false)
SPNamedView const * getNamedView() const
SPDocument * getDocument() const
void setRotationCenterSource(const std::vector< SPItem * > &items)
Inkscape::SnappedPoint constrainedSnap(Inkscape::SnapCandidatePoint const &p, Inkscape::Snapper::SnapConstraint const &constraint, Geom::OptRect const &bbox_to_snap=Geom::OptRect()) const
Try to snap a point along a constraint line to grids, guides or objects.
bool _snapindicator
When true, an indicator will be drawn at the position that was being snapped to.
Inkscape::SnappedPoint constrainedAngularSnap(Inkscape::SnapCandidatePoint const &p, std::optional< Geom::Point > const &p_ref, Geom::Point const &o, unsigned const snaps) const
Try to snap a point to something at a specific angle.
Inkscape::DistributionSnapper distribution
SnapperList getSnappers() const
Return a list of snappers.
void snapTransformed(std::vector< Inkscape::SnapCandidatePoint > const &points, Geom::Point const &pointer, Inkscape::PureTransform &transform)
Method for snapping sets of points while they are being transformed.
Inkscape::SnappedPoint multipleConstrainedSnaps(Inkscape::SnapCandidatePoint const &p, std::vector< Inkscape::Snapper::SnapConstraint > const &constraints, bool dont_snap=false, Geom::OptRect const &bbox_to_snap=Geom::OptRect()) const
Inkscape::SnapPreferences & snapprefs
SPPage const * getPageToIgnore() const
SPNamedView const * _named_view
Inkscape::GuideSnapper guide
guide snapper
Inkscape::SnappedPoint freeSnap(Inkscape::SnapCandidatePoint const &p, Geom::OptRect const &bbox_to_snap=Geom::OptRect(), bool to_path_only=false) const
Try to snap a point to grids, guides or objects.
bool someSnapperMightSnap(bool immediately=true) const
Return true if any snapping might occur, whether its to grids, guides or objects.
SPDesktop const * getDesktop() const
std::vector< Inkscape::SnapCandidatePoint > * _unselected_nodes
Nodes of the path that is currently being edited and which have not been selected and which will ther...
static char const *const parent
Authors: Parth Pant parthpant4@gmail.com
Helper class to stream background task notifications as a series of messages.
SnapSourceType
enumerations of snap source types and snap target types.