summaryrefslogtreecommitdiffstats
path: root/Project/ConnectionLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/ConnectionLine.cpp')
-rw-r--r--Project/ConnectionLine.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Project/ConnectionLine.cpp b/Project/ConnectionLine.cpp
new file mode 100644
index 0000000..68d893a
--- /dev/null
+++ b/Project/ConnectionLine.cpp
@@ -0,0 +1,29 @@
+#include "ConnectionLine.h"
+
+ConnectionLine::ConnectionLine()
+ : ControlElement()
+{
+}
+
+ConnectionLine::~ConnectionLine() {}
+
+void ConnectionLine::Draw(wxPoint2DDouble translation, double scale) const
+{
+
+}
+
+bool ConnectionLine::Contains(wxPoint2DDouble position) const
+{
+ if(PointToLineDistance(position) < 5.0) {
+ return true;
+ }
+ return false;
+}
+
+bool ConnectionLine::Intersects(wxRect2DDouble rect) const
+{
+ for(auto it = m_pointList.begin(); it != m_pointList.end(); ++it) {
+ if(rect.Contains(*it)) return true;
+ }
+ return false;
+}