summaryrefslogtreecommitdiffstats
path: root/src/snapped-line.h
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2007-11-09 09:48:27 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2007-11-09 09:48:27 +0000
commitf45e886fef31d000e419216ecb8732b772876455 (patch)
tree702d3fe9bb08797d3f43000fe84feb33cacfe4b9 /src/snapped-line.h
parentrefactoring, one MakeTweak method instead of a bunch largely similar methods (diff)
downloadinkscape-f45e886fef31d000e419216ecb8732b772876455.tar.gz
inkscape-f45e886fef31d000e419216ecb8732b772876455.zip
Renaming classes: SnappedLine -> SnappedLineSegment, and SnappedInfiniteLine -> SnappedLine
(bzr r4048)
Diffstat (limited to 'src/snapped-line.h')
-rw-r--r--src/snapped-line.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/snapped-line.h b/src/snapped-line.h
index 92f16d905..3fed89d7d 100644
--- a/src/snapped-line.h
+++ b/src/snapped-line.h
@@ -3,7 +3,7 @@
/**
* \file src/snapped-line.h
- * \brief SnappedInfiniteLine class.
+ * \brief SnappedLine class.
*
* Authors:
* Diederik van Lierop <mail@diedenrezi.nl>
@@ -22,13 +22,13 @@ namespace Inkscape
{
/// Class describing the result of an attempt to snap to a line segment.
-class SnappedLine : public SnappedPoint
+class SnappedLineSegment : public SnappedPoint
{
public:
- SnappedLine();
- SnappedLine(NR::Point snapped_point, NR::Coord snapped_distance, NR::Point start_point_of_line, NR::Point end_point_of_line);
- ~SnappedLine();
- Inkscape::SnappedPoint intersect(SnappedLine const &line) const; //intersect with another SnappedLine
+ SnappedLineSegment();
+ SnappedLineSegment(NR::Point snapped_point, NR::Coord snapped_distance, NR::Point start_point_of_line, NR::Point end_point_of_line);
+ ~SnappedLineSegment();
+ Inkscape::SnappedPoint intersect(SnappedLineSegment const &line) const; //intersect with another SnappedLineSegment
private:
NR::Point _start_point_of_line;
@@ -36,14 +36,14 @@ private:
};
-/// Class describing the result of an attempt to snap to an infinite line.
-class SnappedInfiniteLine : public SnappedPoint
+/// Class describing the result of an attempt to snap to a line.
+class SnappedLine : public SnappedPoint
{
public:
- SnappedInfiniteLine();
- SnappedInfiniteLine(NR::Point snapped_point, NR::Coord snapped_distance, NR::Point normal_to_line, NR::Point point_on_line);
- ~SnappedInfiniteLine();
- Inkscape::SnappedPoint intersect(SnappedInfiniteLine const &line) const; //intersect with another SnappedInfiniteLine
+ SnappedLine();
+ SnappedLine(NR::Point snapped_point, NR::Coord snapped_distance, 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)
@@ -57,9 +57,9 @@ private:
}
-bool getClosestSIL(std::list<Inkscape::SnappedInfiniteLine> &list, Inkscape::SnappedInfiniteLine &result);
-bool getClosestIntersectionSIL(std::list<Inkscape::SnappedInfiniteLine> &list, Inkscape::SnappedPoint &result);
-bool getClosestIntersectionSIL(std::list<Inkscape::SnappedInfiniteLine> &list1, std::list<Inkscape::SnappedInfiniteLine> &list2, Inkscape::SnappedPoint &result);
+bool getClosestSL(std::list<Inkscape::SnappedLine> &list, Inkscape::SnappedLine &result);
+bool getClosestIntersectionSL(std::list<Inkscape::SnappedLine> &list, Inkscape::SnappedPoint &result);
+bool getClosestIntersectionSL(std::list<Inkscape::SnappedLine> &list1, std::list<Inkscape::SnappedLine> &list2, Inkscape::SnappedPoint &result);
#endif /* !SEEN_SNAPPEDLINE_H */