summaryrefslogtreecommitdiffstats
path: root/src/snapped-point.h
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-01-03 21:37:41 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-01-03 21:37:41 +0000
commit3614957da595ec421cad8350fe3b645d3f9e836e (patch)
tree141618522cfcc3c1d27b2c0c267df0234909059f /src/snapped-point.h
parent* Added initial Breton (br_FR) translation by Alan Monfort (closes #180070) (diff)
downloadinkscape-3614957da595ec421cad8350fe3b645d3f9e836e.tar.gz
inkscape-3614957da595ec421cad8350fe3b645d3f9e836e.zip
1) fix snapping while scaling
2) fix constrained snapping 3) improve snapping logic (again), or more specifically: better obey "always snap" 4) refactoring to reduce risk of bugs: renaming variables and methods for better readability, adding class members instead of using std::pairs, etc. (bzr r4379)
Diffstat (limited to 'src/snapped-point.h')
-rw-r--r--src/snapped-point.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/snapped-point.h b/src/snapped-point.h
index e4b08a302..f0584812d 100644
--- a/src/snapped-point.h
+++ b/src/snapped-point.h
@@ -26,11 +26,16 @@ class SnappedPoint
{
public:
SnappedPoint();
- SnappedPoint(::NR::Point p, ::NR::Coord d, bool at_intersection = false, NR::Coord d2 = NR_HUGE);
+ SnappedPoint(NR::Point p, NR::Coord d, NR::Coord t, bool a, bool at_intersection, NR::Coord d2, NR::Coord t2, bool a2);
+ SnappedPoint(NR::Point p, NR::Coord d, NR::Coord t, bool a);
~SnappedPoint();
NR::Coord getDistance() const;
+ NR::Coord getTolerance() const;
+ bool getAlwaysSnap() const;
NR::Coord getSecondDistance() const;
+ NR::Coord getSecondTolerance() const;
+ bool getSecondAlwaysSnap() const;
NR::Point getPoint() const;
bool getAtIntersection() const {return _at_intersection;}
@@ -42,12 +47,18 @@ protected:
an intersection of e.g. two lines, then this is the distance to the closest
line */
NR::Coord _distance;
+ /* The snapping tolerance in screen pixels (depends on zoom)*/
+ NR::Coord _tolerance;
+ /* If true then "Always snap" is on */
+ bool _always_snap;
/* If the snapped point is at an intersection of e.g. two lines, then this is
the distance to the fartest line */
- NR::Coord _second_distance;
-
-
+ NR::Coord _second_distance;
+ /* The snapping tolerance in screen pixels (depends on zoom)*/
+ NR::Coord _second_tolerance;
+ /* If true then "Always snap" is on */
+ bool _second_always_snap;
};
}