summaryrefslogtreecommitdiffstats
path: root/src/snapped-line.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-line.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-line.h')
-rw-r--r--src/snapped-line.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/snapped-line.h b/src/snapped-line.h
index be2a792b7..3616058b0 100644
--- a/src/snapped-line.h
+++ b/src/snapped-line.h
@@ -26,7 +26,7 @@ class SnappedLineSegment : public SnappedPoint
{
public:
SnappedLineSegment();
- SnappedLineSegment(NR::Point snapped_point, NR::Coord snapped_distance, NR::Point start_point_of_line, NR::Point end_point_of_line);
+ SnappedLineSegment(NR::Point snapped_point, NR::Coord snapped_distance, NR::Coord snapped_tolerance, bool always_snap, NR::Point start_point_of_line, NR::Point end_point_of_line);
~SnappedLineSegment();
Inkscape::SnappedPoint intersect(SnappedLineSegment const &line) const; //intersect with another SnappedLineSegment
@@ -41,13 +41,13 @@ class SnappedLine : public SnappedPoint
{
public:
SnappedLine();
- SnappedLine(NR::Point snapped_point, NR::Coord snapped_distance, NR::Point normal_to_line, NR::Point point_on_line);
+ SnappedLine(NR::Point snapped_point, NR::Coord snapped_distance, NR::Coord snapped_tolerance, bool always_snap, NR::Point normal_to_line, NR::Point point_on_line);
~SnappedLine();
Inkscape::SnappedPoint intersect(SnappedLine const &line) const; //intersect with another SnappedLine
// This line is described by this equation:
// a*x + b*y = c <-> nx*px + ny+py = c <-> n.p = c
NR::Point getNormal() const {return _normal_to_line;} // n = (nx, ny)
- NR::Point getPointOnLine() const {return _point_on_line;} // p = (px, py)
+ NR::Point getPointOnLine() const {return _point_on_line;} // p = (px, py)
NR::Coord getConstTerm() const {return dot(_normal_to_line, _point_on_line);} // c = n.p = nx*px + ny*py;
private: