summaryrefslogtreecommitdiffstats
path: root/Project/ConnectionLine.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2017-02-24 12:25:41 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2017-02-24 12:25:41 -0300
commita54f50d0bf86c7c4d400e8b4d30cbc6091cfd9df (patch)
treef551481b420d87b8774520169770f9a101bac391 /Project/ConnectionLine.cpp
parent5e7c19ae397164dd718b2593663cee5d1be687cd (diff)
downloadPSP.git-a54f50d0bf86c7c4d400e8b4d30cbc6091cfd9df.tar.gz
PSP.git-a54f50d0bf86c7c4d400e8b4d30cbc6091cfd9df.tar.xz
PSP.git-a54f50d0bf86c7c4d400e8b4d30cbc6091cfd9df.zip
Connection line implementation start
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;
+}