diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-04-12 12:59:26 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-04-12 12:59:26 +0000 |
| commit | f917248c6e109da63a0703e85520bac7318d4f39 (patch) | |
| tree | 693d3357e750f360ae68791f3c093ea090567c81 /src/snapped-line.h | |
| parent | Fix snapping during constrained translation, when only snapping the node clos... (diff) | |
| download | inkscape-f917248c6e109da63a0703e85520bac7318d4f39.tar.gz inkscape-f917248c6e109da63a0703e85520bac7318d4f39.zip | |
Use the line intersection routines in 2geom/line.h instead of the deprecated ones in 2geom/geom.h. (I know we're in a refactoring freeze, but this one I was already working on before this freeze was announced and it's quite safe IMHO. It's only a small change in 2geom's API and can hardly do any real harm. I will not refactor anything else until after the v0.47 release, promised!)
(bzr r7688)
Diffstat (limited to 'src/snapped-line.h')
| -rw-r--r-- | src/snapped-line.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/snapped-line.h b/src/snapped-line.h index 85bbf1caa..3dec432e7 100644 --- a/src/snapped-line.h +++ b/src/snapped-line.h @@ -26,6 +26,7 @@ public: SnappedLineSegment(Geom::Point const &snapped_point, Geom::Coord const &snapped_distance, SnapSourceType const &source, SnapTargetType const &target, Geom::Coord const &snapped_tolerance,bool const &always_snap, Geom::Point const &start_point_of_line, Geom::Point const &end_point_of_line); ~SnappedLineSegment(); Inkscape::SnappedPoint intersect(SnappedLineSegment const &line) const; //intersect with another SnappedLineSegment + Geom::LineSegment getLineSegment() const {return Geom::LineSegment(_start_point_of_line, _end_point_of_line);} private: Geom::Point _start_point_of_line; @@ -46,6 +47,7 @@ public: Geom::Point getNormal() const {return _normal_to_line;} // n = (nx, ny) Geom::Point getPointOnLine() const {return _point_on_line;} // p = (px, py) Geom::Coord getConstTerm() const {return dot(_normal_to_line, _point_on_line);} // c = n.p = nx*px + ny*py; + Geom::Line getLine() const {return Geom::Line(_point_on_line, _point_on_line + Geom::rot90(_normal_to_line));} private: Geom::Point _normal_to_line; |
